Commit graph

80 commits

Author SHA1 Message Date
Mike Barnes 4bc56d9e16 Status notification colour set for Chinwag theme 2021-03-09 08:51:28 +11:00
Mike Barnes 76782ca4b3 Merge Tusky 14 2021-03-02 09:25:38 +11:00
Alibek Omarov 9580870445
Animated emoji support (#2064)
* Animated emoji support

* Try to query preference only once

* Revert to using SpannableStringBuilder
2021-02-06 08:14:51 +01:00
Garrit Franke 0fbb4e9713
Wellbeing mode (#1992)
* 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 e92e636a5c759b09649174ab68ec91bc13680287.

* Remove german translations
2020-12-23 19:13:37 +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
Mike Barnes b2723b7707 First pass at re-theming to match Chinwag 2020-12-15 12:53:03 +11: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
Mélanie Chauvel 4205f5493e
Make account views clickable instead of avatar only (#1855)
Affects:
- New follower request and New follower notifications
- Accounts in Blocked users and Muted users pages
2020-07-07 20:35:31 +02:00
Alibek Omarov 2fc7ad13bb
CustomEmojiHelper: rewrite to Kotlin (#1787)
* CustomEmojiHelper: rewrite to Kotlin

* CustomEmojiHelper: PR fixes
2020-05-15 22:09:12 +02:00
Konrad Pozniak 3c3e872782
fix content warning in notifications when alwaysShowSpoiler is on (#1757) 2020-04-18 13:45:07 +02:00
Konrad Pozniak 2cf1e366b8
convert MainActivity to Kotlin and upgrade MaterialDrawer to version 8 (#1748)
* 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
2020-04-15 18:57:53 +02:00
Levi Bard 4a4dd4f30f
Add notifications for follow requests (#1729)
* Add notifications for follow requests
Issue #1719

* Revert item_follow_request layout, create new layout for follow request notifications

* Migrate follow request interaction from notification to observable pattern

* Filter follow request notifications by default

* Add missing cases for system notification generation

* Format code
2020-03-19 22:02:10 +01:00
Ivan Kupalov 67c20326f9
Add options to confirm reblog/unreblog actions, close #460 (#1650) 2020-03-03 21:27:26 +01:00
Levi Bard 3edc47aa4a
Add option to show link previews in timelines (#1681)
* 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
2020-03-02 19:34:31 +01:00
Konrad Pozniak c379014d9a
fix content collapse button not working in notifications (#1665) 2020-02-04 22:21:43 +01:00
Ivan Kupalov 92e9c9a762 Fix setting text to CW button in fav/reblog notification. Fix #1641 (#1642)
This is a regression from e5b78f65cf
2020-01-16 19:08:19 +01:00
Konrad Pozniak cd52caf9e9
fix crash in NotificationAdapter when status is null (#1634) 2020-01-13 21:12:33 +01:00
Konrad Pozniak e5b78f65cf
use material buttons in timeline (#1627)
* use material buttons in timeline

* remove wrong switch option
2020-01-07 19:40:52 +01:00
Ivan Kupalov 7623962a0d Use blurhash as image preview and as sensitive media cover, close #1571 (#1581)
* 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
2019-12-30 21:37:20 +01:00
Konrad Pozniak 70b3ce7487
fix avatar radius and alignment in NotificationsAdapter (#1437) 2019-08-01 20:47:15 +02:00
Konrad Pozniak 588775ff9b
cleanup code in StatusViewHolders (#1418)
* cleanup code in status ViewHolder

* add check for reblogButton back in
2019-07-27 21:53:28 +02:00
Konrad Pozniak 57edf86495
fix timestamp not updating in notifications (#1416) 2019-07-27 21:52:00 +02:00
Konrad Pozniak 83696b5c7f
Animate gif avatars (#1279)
* animate gif avatars

* add setting to enable avatar animation

* cleanup code
2019-05-26 08:46:08 +02:00
Conny Duck 4d58ecb4ea stop buggy gif animation for now 2019-05-08 21:42:22 +02:00
Konrad Pozniak e735e4843e
Poll notifications (#1229)
* 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
2019-05-02 19:44:35 +02:00
pandasoft0 76ce28980c Migrate to Glide (#1175)
* Replace Picasso library with Glide library tuskyapp#1082

* Replace Picasso library with Glide library tuskyapp#1082

* Update load emoji with glide

* Update context used for Glide

* Removed unused import

* Replace deprecated SimpleTarget with CustomTarget

* Fix crash at the view image fragment, remove override image size

* Replace Single.create with Single.fromCallable

* View image fragment refactor

* Fix after merge

* Try to load cached image first and show progress view on failure

* Try to load cached image first and show progress view on failure
2019-04-16 21:39:12 +02:00
pandasoft0 63e4c1d4e0 Add CLEAR and FILTER buttons to notifications (#1168)
* 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
2019-04-09 19:13:54 +02:00
Konrad Pozniak 9b59a57356
Fix wrong notification avatar being displayed sometimes (#1166) 2019-03-30 09:10:01 +01:00
Konrad Pozniak 2e52457b32
Hide unknown notifications (#1151)
* hide unknown notifications

* hide unknown notifications
2019-03-25 20:35:21 +01:00
pandasoft0 c3df44eaef Update Notification Adapter to support status created timestamp refresh (#1130)
* Update Notification Adapter to support status created timestamp refresh

* Format the code
2019-03-25 13:44:31 +01:00
kyori19 d0f7f6f83c Fix crash with unknown notification type (#1123)
* Fix crash with unknown notification type

* Add NotificationTypeAdapter to handle unknown type

* Remove unneeded SerializedName
2019-03-16 14:33:16 +01:00
Ivan Kupalov 47fa775f21 Refactor notifications adapter (#985)
* Fix unnecessary reloading of notifications

This removes topId as it is not needed and just plainly uses status id
if needed. During initial loading of notifications topId/bottomId are
not set so we ended up reloading everything.

* Refactor notifications adapter

Use AsyncListDiffer for updating notifications just like in timelines.

* Cleanup in NotificationsFragment
2019-03-07 19:31:18 +01:00
Konrad Pozniak a445c12094
Upgrade to AndroidX, move to MaterialComponents theme (#953)
* upgrade to AndroidX, upgrade libraries

* move to MaterialComponents theme

* make sure the compose button looks good everywhere

* fix tollbar title/button alignment on tablet

* move to new material color theming, consolidate colors and themes

* fix build, fix imports

* set error on TextInputLayout instead of EditText

* fix imports, TootButton when

* improve snackbar style

* fix task description color
2018-12-17 15:25:35 +01:00
Konrad Pozniak 7bdc22aa28
small improvements for viewholders (#860) 2018-09-28 17:15:01 +02:00
HellPie 4759783d10 Add support for collapsible statuses when they exceed 500 characters (#825)
* Update Gradle plugin to work with Android Studio 3.3 Canary

Android Studio 3.1.4 Stable doesn't render layout previews in this project
for whatever reason. Switching to the latest 3.3 Canary release fixes the
issue without affecting Gradle scripts but requires the new Android Gradle
plugin to match the new Android Studio release.

This commit will be reverted once development on the feature is done.

* Update gradle build script to allow installing debug builds alongside store version

This will allow developers, testers, etc to work on Tusky will not having to worry
about overwriting, uninstalling, fiddling with a preinstalled application which would
mean having to login again every time the development cycle starts/finishes and
manually reinstalling the app.

* Add UI changes to support collapsing statuses

The button uses subtle styling to not be distracting like the CW button on the timeline
The button is toggleable, full width to match the status textbox hitbox width and also
is shorter to not be too intrusive between the status text and images, or the post below

* Update status data model to store whether the message has been collapsed

* Update status action listener to notify of collapsed state changing

Provide stubs in all implementing classes and mark as TODO the stubs that
require a proper implementation for the feature to work.

* Add implementation code to handle status collapse/expand in timeline

Code has not been added elsewhere to simplify testing.
Once the code will be considered stable it will be also included in other
status action listener implementers.

* Add preferences so that users can toggle the collapsing of long posts

This is currently limited to a simple toggle, it would be nice to implement
a more advanced UI to offer the user more control over the feature.

* Update Gradle plugin to work with latest Android Studio 3.3 Canary 8

Just like the other commit, this will be reverted once the feature is working.
I simply don't want to deal with what changes in my installation of Android
Studio 3.1.4 Stable which breaks the layout preview rendering.

* Update data models and utils for statuses to better handle collapsing

I forgot that data isn't available from the API and can't really be built
from scratch using existing data due to preferences.
A new, extra boolean should fix the issue.

* Fix search breaking due to newly introduced variables in utils classes

* Fix timeline breaking due to newly introduced variables in utils classes

* Fix item status text for collapsed toggle being shown in the wrong state

* Update timeline fragment to refresh the list when collapsed settings change

* Add support for status content collapse in timeline viewholder

* Fix view holder truncating posts using temporary debug settings at 50 chars

* Add toggle support to notification layout as well

* Add support for collapsed statuses to search results

* Add support for expandable content to notifications too

* Update codebase with some suggested changes by @charlang

* Update more code with more suggestions and move null-safety into view data

* Update even more code with even more suggested code changes

* Revert a0a41ca and 0ee004d (Android Studio 3.1 to Android Studio 3.3 updates)

* Add an input filter utility class to reuse code for trimming statuses

* Update UI of statuses to show a taller collapsible button

* Update notification fragment logging to simplify null checks

* Add smartness to SmartLengthInputFilter such as word trimming and runway

* Fix posts with show more button even if bad ratio didn't collapse

* Fix thread view showing button but not collapsing by implementing the feature

* Fix spannable losing spans when collapsed and restore length to 500 characters

* Remove debug build suffix as per request

* Fix all the merging happened in f66d689, 623cad2 and 7056ba5

* Fix notification button spanning full width rather than content width

* Add a way to access a singleton to smart filter and use clearer code

* Update view holders using smart input filters to use more singletons

* Fix code style lacking spaces before boolean checks in ifs and others

* Remove all code related to collapsibility preferences, strings included

* Update style to match content warning toggle button

* Update strings to give cleaner differentiation between CW and collapse

* Update smart filter code to use fully qualified names to avoid confusion
2018-09-19 19:51:20 +02:00
Konrad Pozniak 4402f3d337
update minSdkVersion to 21 (#843)
* set minSdkVersion to 21

* use elevation instead of additional views for shadow

* clean up code occurrences

* remove drawable compat code

* remove no longer needed resources

* remove unneeded android:clipChildren="false"

* Revert "remove no longer needed resources"

This reverts commit 67a4d6f8d87b3f116b95d90dfb48f350d342f503.

* remove no longer needed resources (this time the right ones)
2018-09-16 18:54:12 +02:00
Conny Duck 51d231834c Merge branch 'AbsoluteTime' of https://github.com/kyori19/Tusky into kyori19-AbsoluteTime
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java
2018-09-09 21:48:01 +02:00
Konrad Pozniak 28c1c90a98
fix account list loading and clean up a lot of code (#823)
* fix account list loading and clean up a lot of code

* remove ACCESS_COARSE_LOCATION for API levels 23+

* small improvements
2018-08-31 21:52:09 +02:00
Conny Duck 1fef8c0c2b fix crash in NotificationsFragment when Preferences are first accessed
fixes #797
2018-08-24 19:47:27 +02:00
Konrad Pozniak 4653b1e37b
fix notification tab loading (#777)
* fix progressbars of footer and fragment overlapping

* add progressbar to bottom of notification list again

* fix bottom loading getting stuck sometimes
2018-08-22 21:18:56 +02:00
kyori 589188e27d Prevent creating new object in setCreatedAt 2018-08-20 22:51:30 +09:00
kyori ad888854bc Use SimpleDateFormatter repeatedly. 2018-08-20 20:56:22 +09:00
kyori 4264fc42d6 Add process for when the createdAt is null. 2018-08-20 19:29:58 +09:00
kyori b4bb80c4d5 Stop initializing String. 2018-08-20 17:47:19 +09:00
kyori 219eafe6fc Prevent query SharedPreference in adapters. 2018-08-17 14:42:15 +09:00
kyori 1d657a65a7 Show absolute time in Notifications tab 2018-08-16 23:10:21 +09:00
Ivan Kupalov 133808891d Add RoundedImageView for avatars (#739)
* Add RoundedImageView for avatars

* RoundedImageView: Remove unused things, fix touchable area
2018-07-30 15:36:22 +02:00
Conny Duck c10cc59a8a enable custom emojis in follow notifications 2018-07-01 15:57:26 +02:00
Conny Duck 1d8d1efb5b enable custom emojis in notification messages 2018-07-01 14:44:38 +02:00
Konrad Pozniak e8d1b16b39
improve custom emoji support (#687) 2018-06-24 09:53:23 +02:00