Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android, Feature Request: allow subscribing to multiple topics #23

Closed
aslmx opened this issue Nov 25, 2021 · 3 comments
Closed

Android, Feature Request: allow subscribing to multiple topics #23

aslmx opened this issue Nov 25, 2021 · 3 comments
Labels
android-app ntfy Android app enhancement New feature or request

Comments

@aslmx
Copy link

aslmx commented Nov 25, 2021

The Web and curl allow for subscribing to multiple topics, like this:

Subscribing to multiple topics (topic1,topic2,...)

It's possible to subscribe to multiple topics in one HTTP call by providing a comma-separated list of topics in the URL. This allows you to reduce the number of connections you have to maintain: 

That does not work in the app currently, but would make "following" multiple topics easier.

@binwiederhier
Copy link
Owner

So you can obviously subscribe to multiple topics in the app by clicking the + button. So are you talking about

A. Subscribing to multiple topics in the same add dialog box? So that you'd enter a comma separated list and you'd only see one entry in the main view?

B. Or just a more convenient way to add multiple topics at once?

I think it would help if you described your preferred screen flow and text boxes. Sorry I'm just not quite grasping what's missing.

@binwiederhier binwiederhier added android-app ntfy Android app enhancement New feature or request labels Nov 26, 2021
@aslmx
Copy link
Author

aslmx commented Nov 26, 2021

Yeah, valid question - sorry, could have given more details!

Actually i thought about usecase A, having multiple topic subscriptions under one entry that can be added at once (and of course later be changed).

I'm not sure how you handle the long running http connection.

I'm not competent to check the source of the app and evaluate it myself, hence asking: would there a be a difference of listening to two topics in one http request (so letting the server decide to send you posts two either of the topic) or querying multiple topcis with it's own separate subscription?

If there is no difference, you might as well just allow adding two topics by comma separation and after the user clicked "Add" separate it into two individual subscriptions.

If it doesn't make any performance difference then I think it is up to you to decide.

Could as well add more UI complexity by asking the user. But i thought the simplest solution is to just copy what you support via WebUi and cURL, which is usecase A.

@binwiederhier
Copy link
Owner

binwiederhier commented Nov 26, 2021

I'm not sure how you handle the long running http connection. I'm not competent to check the source of the app and evaluate it myself, hence asking: would there a be a difference of listening to two topics in one http request (so letting the server decide to send you posts two either of the topic) or querying multiple topcis with it's own separate subscription?

I made the comma-separated multi-topic subscription especially for the Android app. The app only keeps one connection per host to avoid using double the battery.

Example: If you subscribe to topic1, it'll listen to https://ntfy.sh/topic1/json. If you then add topic2, it'll break the first connection and restart it as https://ntfy.sh/topic1,topic2/json. There is a little bit of UI-trickery to avoid showing that we're reconnecting, but that's what's happening.

If there is no difference, you might as well just allow adding two topics by comma separation and after the user clicked "Add" separate it into two individual subscriptions. If it doesn't make any performance difference then I think it is up to you to decide.

I can absolutely do that, though the "Subscribe to topic" dialog is already too crowded, so I fear another sentence a la "You may enter a comma-separated list to subscribe to multiple topics" is gonna be a little much. I'll experiment a bit. Though I am leaning towards not changing it.

If you're mainly worried about the annoyance of having to re-enter your home-server IP/address, I just added an automatic auto-fill to avoid that (see #13). In this screenshot, the server address is auto-filled, because it's the server that you've already used before. If there's more than one, there's a drop-down too now (this is not released yet):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android-app ntfy Android app enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants