Fasthub: Filtering notifications

Created on 17 Oct 2017  路  7Comments  路  Source: k0shk0sh/FastHub

FastHub Version: 4.4.2
Android Version: 7.1.2
Device Information:

  • MANUFACTURER: Xiaomi
  • BRAND: Xiaomi

- MODEL: Mi 5

Background

Github provides some basic notifications filtering, so I can choose what I want to subscribe to:

  • Participating-only vs. Everything:
    screen shot 2017-10-17 at 02 15 43

  • Different types of events:
    screen shot 2017-10-17 at 02 16 08

It would be very useful to have something similar in FastHub. Currently I turned off notifications, because I get too many of them. I'm watching many repos and I also have my work projects on Github, so if I get notified for all events, it's a complete mess. I would like to get push-notifications only for "participating" events (and only certain types).

Feature requests

Participating vs. watching

I think that distinction between participating/watching is so important, I would even add a tab to to notifications view: (unread) Participating, (unread) Watching, (read) All. Or probably a filter control. Notice that Github has such tab on the notifications page:

screen shot 2017-10-17 at 02 27 18

Filtering by reasons (?)

Looking at the Notifications API (you're using REST API, right?), I see that there is a list of reasons. Would be nice to have this list in the notifications settings and being able to do 2 things for each reason:

  • turn on/off showing this type of notifications in the notifications view
  • turn on/off push-notifications of this type

On the second thought, I'm not sure if these reasons are actually good filters.. I was thinking more of filtering by the type of event (like on the screenshot above: comments, pushes, reviews, etc.)

Different filters per organisation (dreaming)

As I mentioned, I have my work projects on Github, my personal ones and those that I'm just following. So it would be just _awesome_ to setup filtering per organisation (repo owner). For example, I'd like to get more notifications from the repos in my work orgs, basic events in my personal projects and only few events on the projects I watch.

This is probably too complicated, I don't know (could be a pro-feature if ever implemented). Just throwing in an idea..


P.S. I've tried many apps for GitHub and stopped on FastHub, it's the best one at the moment :1st_place_medal: I even bought pro-features today. Thanks for the great app!

Won't Implement

All 7 comments

As you can see, I can't do much about that since the API doesn't provide any sort of way to request per reason.

Now comes the technical part,

Lets say, we request the first page which is 30, 40 or 100, your filter is to show only these that are PRs, the first page doesn't have a PR, so now we endup with empty list & therefore pagination isn't gonna work.

I had love to do this and other filtering things but simply I can't because they will require tooo many bloated code and I'm not interested on the complexity of this.

I hope you can understand that and thanks for the issue.

OK, you can't request notifications by reason, but you can filter by reason on the client. Another thing is that you can request only "participating" issues (list notifications request has participating parameter). But that's not my point, I actually want client-side filtering. The link to the API was to show that the reason is provided in the response.

Lets say, we request the first page which is 30, 40 or 100, your filter is to show only these that are PRs, the first page doesn't have a PR, so now we endup with empty list & therefore pagination isn't gonna work.

To be honest, I don't see what is the problem with pagination. Ok, first page doesn't have PRs, we query next page probably it does. Aren't we querying page-by-page anyway to get all notifications? What's the big deal about filtering things after we got them all?

If we are currently getting all notifications anyway, it shouldn't be very problematic to add some interface to filter the list. Same goes about pushes (same interface, but in the settings). If I understand correctly, FastHub polls notifications with a fixed schedule and then "pushes" them on the device. So could it "push" them selectively?

We can't get all as GitHub has a limit of returning data per page. So again, will bring us to point zero.

That's the point of pagination 馃槃
How do you get notifications now? Do you get only one page?

One by one ( upon scrolling ) retrieving new page if any!

OK, makes sense.
Could you point me to the relevant code in the app? I don't know Kotlin, but anyway I think I'll figure out what's going on faster if I see the code and ask less (probably stupid) questions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinX3 picture MartinX3  路  3Comments

shaboigan picture shaboigan  路  3Comments

adueppen picture adueppen  路  3Comments

alexejk picture alexejk  路  3Comments

rigrassm picture rigrassm  路  3Comments