Commit Graph

14 Commits

Author SHA1 Message Date
Konrad Pozniak fd9d48e4a6
remove legacy notification channel cleanup (#2550) 2022-05-25 20:54:25 +02:00
Peter Cai 9ec5d6e3b0
Push notifications support via UnifiedPush (#2303)
Fixes #793.

This is an implementation for push notifications based on UnifiedPush
for Tusky. No push gateway (other than UP itself) is needed, since
UnifiedPush is simple enough such that it can act as a catch-all
endpoint for WebPush messages. When a UnifiedPush distributor is present
on-device, we will by default register Tusky as a receiver; if no
UnifiedPush distributor is available, then pull notifications are used
as a fallback mechanism.

Because WebPush messages are encrypted, and Mastodon does not send the
keys and IV needed for decryption in the request body, for now the push
handler simply acts as a trigger for the pre-existing NotificationWorker
which is also used for pull notifications. Nevertheless, I have
implemented proper key generation and storage, just in case we would
like to implement full decryption support in the future when Mastodon
upgrades to the latest WebPush encryption scheme that includes all
information in the request body.

For users with existing accounts, push notifications will not be enabled
until all of the accounts have been re-logged in to grant the new push
OAuth scope. A small prompt will be shown (until dismissed) as a
Snackbar to explain to the user about this, and an option is added in
Account Preferences to facilitate re-login without deleting local drafts
and cache.
2022-05-17 19:32:09 +02:00
Levi Bard dff039e123
Add support for post edit notifications (#2431)
* Add support for post edit notifications

* Update notification icon
2022-04-19 11:10:13 +02:00
Konrad Pozniak 027b659d1c
fix notifications showing unparsed html (#2436) 2022-04-16 09:44:05 +02:00
kyori19 d21d045eda
Support new signup notifications (#2357) 2022-04-14 19:39:30 +02:00
Konrad Pozniak 55513e8e2b
Android 12 support, update AndroidX libraries (#2367)
* Android 12 support, update AndroidX libraries

* fix ktlint

* add Android 12 splash screen support

* fix comments in MainActivity

* remove deprecated Intent.ACTION_CLOSE_SYSTEM_DIALOGS

* delete TimelineViewModelTest

* fix notifications on Android 12

* improve splash screen

* handle pending intent flags in a dedicated function
2022-03-09 20:50:23 +01:00
Levi Bard d07c1b098e
Highlight your own votes when displaying poll results (#2242)
* Highlight your own votes when displaying poll results

* Unbreak tests

* Add a checkmark to the description of self-voted options
2021-09-17 22:12:17 +02:00
Ivan Kupalov 44a5b42cac
Timeline refactor (#2175)
* Move Timeline files into their own package

* Introduce TimelineViewModel, add coroutines

* Simplify StatusViewData

* Handle timeilne fetch errors

* Rework filters, fix ViewThreadFragment

* Fix NotificationsFragment

* Simplify Notifications and Thread, handle pin

* Redo loading in TimelineViewModel

* Improve error handling in TimelineViewModel

* Rewrite actions in TimelineViewModel

* Apply feedback after timeline factoring review

* Handle initial failure in timeline correctly
2021-06-11 20:15:40 +02:00
Konrad Pozniak 40b24cd242
migrate to RxJava3 (#2146)
* migrate to RxJava3

* remove unused import
2021-05-16 19:53:27 +02:00
Konrad Pozniak 0b86f58139
convert some regular strings to plural strings (#2100)
* convert some regular strings to plural strings

* convert hint_describe_for_visually_impaired from string to plurals

* fix ukrainian strings
2021-03-07 19:43:25 +01:00
Alibek Omarov b91a0aceeb
Notification bell (#2012)
* Add notification bell button, API endpoints and new relationship field

* Add notification type for subscriptions

* Add subscriptions to legacy notification filtering

* Update schemas

* Fix build

* Make rewrite static method into method of Notification class, fix getNotificationText

* Mastodon wording for subscriptions
2020-12-23 12:52:39 +01:00
Konrad Pozniak 3558d441a4
better distinction between green and blue build flavors (#1997) 2020-11-28 17:34:21 +01:00
Levi Bard 2170e6b0fa
Perform bidirectionality isolation manually instead of relying on `BidiFormatter` (#1976)
* Perform manual isolation of display names etc. instead of relying on BidiFormatter.
Fixes #1921

* Make follow request notification header formatting more like other notifications
2020-11-04 18:21:41 +01:00
Konrad Pozniak b280e25727
use AndroidX WorkManager instead of Evernote Android Job (#1783)
* use AndroidX WorkManager instead of Evernote Android Job

* move notification related classes to their own package

* fix missing import
2020-05-12 18:46:49 +02:00