* Show account's creation date in Profile.
* Fix broken test.
* Store account creation date in the Database.
* Reformat and reposition Joined Date according to PR Feedback.
* Revert "Store account creation date in the Database."
This reverts commit d9761f53 as it's not needed.
* Change Account's Creation Date to a java.util.Date.
Update Test.
* Fix wildcard import.
* Show full month instead of an abbreviation.
* Remove `lazy` usage in favor of local instantiation.
Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
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.
Previously we simply closed the screen with the login WebView which
could cause confusion. Now we specify that page could not be loaded.
As a side effect it will also show the error message which the server
returns (if any).
* Set TextIsSelectable on the corresponding view holders and remove a longpress listener to let Android select text.
* Revert changes, and make selectable text only in detailed status.
Remove long press listener to copy to clipboard (as it interferes with natural text selection on Android).
* Remove unused string (copy_to_clipboard_success) from all translations.
Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
* 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
* multiple media upload support
* multiple media upload support
* multiple media upload support
* remove typing
* Update app/src/main/res/values/strings.xml
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
* remove magic number on string.xml and add to activity.
* move edittext cursor to first when shareBody parsed in ComposeActivity
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
* 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
* multiple media upload support
* multiple media upload support
* multiple media upload support
* remove typing
* Update app/src/main/res/values/strings.xml
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
* remove magic number on string.xml and add to activity.
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
* Add wellbeing mode settings toggle
* Translate wellbeing mode string to german
* Disable fav/boost count on toots if wellbeing is enabled
* Hide follow/post stats on profiles
* Reload notifications when wellbeing mode is toggled
* Add wellbeing mode explainer dialog
* Move wellbeing filter timeline into own category
* Add toggles for quantitative stats
* Hide announcement badge counts if wellbeing is enabled
* Move fetching of wellbeing setting to activity
* Add wellbeing option to statusDisplayOptions
* Update post filters for all accounts
* Remove local translations
* Revert "Remove local translations"
This reverts commit e92e636a5c.
* Remove german translations
* 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
* add personal notes to AccountActivity
* use RxJava instead of plain okhttp calls
* make AccountViewModel rx aware
* hide note input until data is loaded
* Change characters left color to red when negative
* Use val for the integers, optimize variable assignment
* Added tusky_red color
* remove extra line typo
* make characters left bold
* change red hue
* fix typo
* Refactor main preferences to use DSL
* Refactor account preferences to use DSL
* Use DSL in rest of the preference screens
* Preferences cleanup
* Fix preference dependencies
* enable multiple hashtags in one hashtag tab
* add comment explaining the code in TabAdapter
* delete unused drawables
* add padding to EditText in dialog
* convert MainActivity to Kotlin
* migrate to MaterialDrawer 8
* fix drawer styles
* revert removing BezelImageView and material_drawer_header override
* fix tests
* add lost comment back to material_drawer_header.xml
* add tools:parentTag to material_drawer_header.xml
* use when instead of if in MainActivity
* fix statusbar color over the drawer
* cleanup drawer item creation
* tint secondary drawer items as well
* remove unnecessary ids
* fix header text color in the light theme
* improve header text contrast
* Add option to show link previews in timelines.
Addresses #1075
* Indent cards in non-selected statuses when viewing threads
* Indent cards in timelines
* Fix clipping of right side of preview in timelines
* Warn when scheduling a post within 5 minutes
* Fix NPE when scheduled post time isn't set
* Use AlertDialog with option to cancel instead of Toast when a post isn't scheduled far enough in advance
* Move schedule validation warning to scheduling bottom sheet
* Fix scheduling error display when sending after an initially-valid scheduling time has become invalid
* Theme refactoring
* disable the automatic tinting of surfaces with elevation in dark mode
* make the media warning visible again with the dark theme
* fix nav bar on api 27+
* use correct color for all media warnings
* Add support for audio attachments.
Partially addresses #1337
* Register Tusky as a target for audio sharing
* Use icon with textColorTertiary for audio preview
* Use blurhash as image preview and as sensitive media cover, close#1571
* Fix focal point for blurhashes
* Fix video indicator overlapping sensitive media indicator
* Add a preference for blurhash
* Add blurhash to report UI.
* Introduce StatusDisplayOptions
* 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
* upgrade api level to Android 10, resolve compile errors
* use androidx.preference.PreferenceManager instead of deprecated platform class
* add hyphenation to important TextViews
* setBottomSheetCallback -> addBottomSheetCallback
* implement new sharing api
* improve TuskyTileService so it shows account picker when multiple accounts are present
* delete unused AccountChooserService
* fix test
* improve ShareShortcutHelper
* remove debug log statement
* improve image loading fallback behavior in ShareShortcutHelper
* improve behavior on foldable devices
* Scheduled toot
* Hide scheduled toot button if version < 2.7.0
* Fix timeline reloading after toot
* Add edit icon to ComposeScheduleView
* Add button to reset scheduled toot
* Close bottom sheet and change button color after time a was selected
* Fix edit icon's size
* List of scheduled toots
* Fix instance version check
* Use MaterialDatePicker
* Set date and time consecutively
* Add licenses
* add support for american/british english distinction
* Update strings.xml
Just one additional change - anonymize (US) to anonymise (UK)
* change english language names
* add missing translation string