* First attempt at user notifications of failure when media upload fails
* Drafts alert displays alert
* ktLint
* Fix defaced 46.json, add 47.json
* Mock draftsNeedUserAlert in MainActivityTest to prevent spurious failure
* Friendlier posts-failed message
* Create DraftsAlert object
* DraftsAlert works
* Not the cleanest, but DraftsAlert works with multiple accounts
* Use plural strings
* KtLint
* Clean up debug prints
* Simplify DraftsAlert per Conny suggestions
* Text change suggested by Conny
* ktLint again
* Back out test changes
* Fix MainActivityTest for new approach
* Tweak debug log
* Do not use GlobalScope for coroutines
* Add editedAt field to Status
* Status: Display indicators of edited posts
* Annotate edited posts in the Status description
* Cache info that post has been edited
* Fix duplicated language entries from system and app language sets.
Closes#2900
* Prefer modern language codes.
Closes#2903
* Synchronize per-account default posting language with server.
Closes#2902
* Allow users to post in languages android doesn't know about yet (e.g. toki pona)
* Always put the preselected language at the top of the list
* Add UI for selecting post language
* Apply selected language when sending status
* Save/restore post language with drafts
* Fall back to english if the configured language isn't found in the locale list (no-NB)
* Remove comment about no_NB
* Move language dropdown to top of compose view
* Preserve language when redrafting
* Set default language to target post's language when replying
* Add Tusky license header to new source file
* Tweak language dropdown button width
* 2616: Save Scheduled Time for Drafts.
Signed-off-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
* Revert 39.json schema to the original state before my changes.
* handle media size instance limits
* remove unused attributes from Instance entity
* support max_media_attachments
* support pleroma field limits, remove max_bio_chars support
* improve field input margin
* fix tests
* MAX_ACCOUNT_FIELDS -> DEFAULT_MAX_ACCOUNT_FIELDS
* improve "add field" button behavior
* fix copy paste mistake in AccountFieldEditAdapter
* refactor sendStatus to be a suspending function
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.
* Add data model for instance configuration
* Support instance.configuration.statuses.max_characters
* Support instance.configuration.statuses.characters_reserved_per_url
* Support instance.configuration.polls.max_options and max_characters_per_option
* Pacify ktlint
* Support instance-configured poll durations
* Fixup versions for migration after rebase
* Migrate LinkHelper to kotlin
* Support tags field on statuses
* Use embedded tags list in status instead of text scraping to embed tag click handler.
Fixes#2283
* Make mentions and tags lists nonnullable
* Make LinkHelper.openLink a Context extension method
* Use builtin extension for uri conversion
* More cleanup in LinkHelper
* Add tests for LinkHelper.getDomain
* Unbreak tags in places that don't have a tag list (e.g. profiles)
* Fixup javadoc
* first setup
* network timeline paging / improvements
* rename classes / move to correct package
* remove unused class TimelineAdapter
* some code cleanup
* remove TimelineRepository, put mapper functions in TimelineTypeMappers.kt
* add db migration
* cleanup unused code
* bugfix
* make default timeline settings work again
* fix pinning statuses from timeline
* fix network timeline
* respect account settings in NetworkTimelineRemoteMediator
* respect account settings in NetworkTimelineRemoteMediator
* update license headers
* show error view when an error occurs
* cleanup some todos
* fix db migration
* fix changing mediaPreviewEnabled setting
* fix "load more" button appearing on top of timeline
* fix filtering and other bugs
* cleanup cache after 14 days
* fix TimelineDAOTest
* fix code formatting
* add NetworkTimeline unit tests
* add CachedTimeline unit tests
* fix code formatting
* move TimelineDaoTest to unit tests
* implement removeAllByInstance for CachedTimelineViewModel
* fix code formatting
* fix bug in TimelineDao.deleteAllFromInstance
* improve loading more statuses in NetworkTimelineViewModel
* improve loading more statuses in NetworkTimelineViewModel
* fix bug where empty state was shown too soon
* reload top of cached timeline on app start
* improve CachedTimelineRemoteMediator and Tests
* improve cached timeline tests
* fix some more todos
* implement TimelineFragment.removeItem
* fix ListStatusAccessibilityDelegate
* fix crash in NetworkTimelineViewModel.loadMore
* fix default state of collapsible statuses
* fix default state of collapsible statuses -tests
* fix showing/hiding media in the timeline
* get rid of some not-null assertion operators in TimelineTypeMappers
* fix tests
* error handling in CachedTimelineViewModel.loadMore
* keep local status state when refreshing cached statuses
* keep local status state when refreshing network timeline statuses
* show placeholder loading state in cached timeline
* better comments, some code cleanup
* add TimelineViewModelTest, improve code, fix bug
* fix ktlint
* fix voting in boosted polls
* code improvement
* cleanup warnings, reorganize some code
* move ComposeAutoCompleteAdapter to compose package
* composeOptions doesn't need to be a class member
* add DraftsActivity and DraftsViewModel
* drafts
* remove unnecessary Unit in ComposeViewModel
* add schema/25.json
* fix db migration
* drafts
* cleanup code
* fix compose activity rotation bug
* fix media descriptions getting lost when restoring a draft
* improve deleting drafts
* fix ComposeActivityTest
* improve draft layout for almost empty drafts
* reformat code
* show toast when opening reply to deleted toot
* improve item_draft layout
* 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
* Convert ComposeActivity to Kotlin
* More ComposeActivity cleanups
* Move ComposeActivity to it's own package
* Remove ComposeActivity.IntentBuilder
* Re-do part of the media downsizing/uploading
* Add sending of status to ViewModel, draft media descriptions
* Allow uploading video, update description after uploading
* Enable camera, enable upload cancelling
* Cleanup of ComposeActivity
* Extract CaptionDialog, extract ComposeActivity methods
* Fix handling of redrafted media
* Add initial state and media uploading out of Activity
* Change ComposeOptions.mentionedUsernames to be Set rather than List
We probably don't want repeated usernames when we are writing a post
and Set provides such guarantee for free plus it tells it to the
callers. The only disadvantage is lack of order but it shouldn't be a
problem.
* Add combineOptionalLiveData. Add docs.
It it useful for nullable LiveData's. I think we cannot differentiate
between value not being set and value being null so I just added the
variant without null check.
* Add poll support to Compose.
* cleanup code
* move more classes into compose package
* cleanup code
* fix button behavior
* add error handling for media upload
* add caching for instance data again
* merge develop
* fix scheduled toots
* delete unused string
* cleanup ComposeActivity
* fix restoring media from drafts
* make media upload code a little bit clearer
* cleanup autocomplete search code
* avoid duplicate object creation in SavedTootActivity
* perf: avoid unnecessary work when initializing ComposeActivity
* add license header to new files
* use small toot button on bigger displays
* fix ComposeActivityTest
* fix bad merge
* use Singles.zip instead of Single.zip
* show poll notifications in the app
* show poll notifications in the app
* allow filtering poll notifications in the poll fragment
* show poll notifications in system notifications
* Issue tuskyapp#762 add clear notifications button to the top of the Notifications adapter
* Issue tuskyapp#764 add the notifications filter
* Update notifications top bar buttons
* Replace PopupMenu with PopupWindow. Save notifications filter to the account table
* Disable hide top bar on empty content at the notification screen
* Add app bar behavior to the sw640 notification layout
* Fix issue with click on top notification tab