Commit Graph

89 Commits

Author SHA1 Message Date
kyori19 762b2225ca Merge remote-tracking branch 'tuskyapp/develop' 2019-11-19 21:52:13 +09:00
Konrad Pozniak 78b5aa8baf
Upgrade api level to Android 10, implement new sharing api (#1537)
* 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
2019-10-22 21:18:20 +02:00
kyori19 820a38b070 Merge remote-tracking branch 'tuskyapp/master' 2019-09-25 20:20:37 +09:00
Konrad Pozniak de4473b2b3
use singletonList in getChangePayload (#1486) 2019-09-17 18:44:33 +02:00
kyori19 c11ea7ae80 Merge remote-tracking branch 'tuskyapp/master' 2019-09-07 17:55:52 +09:00
Konrad Pozniak 04da5f40c7
fix error and content overlapping in NotificationsFragment (#1465) 2019-09-03 18:34:00 +02:00
kyori19 573be935a7 [quote] Implement quote feature 2019-09-03 23:08:13 +09:00
Konrad Pozniak 8834c22120
add option to always expand content warnings (#1422) 2019-07-28 19:59:52 +02:00
Konrad Pozniak b1c2fcc157
update timestamps on pull-to-refresh even when no new statuses are fetched (#1393) 2019-07-16 19:51:44 +02:00
pandasoft0 ce501f24e6 Add setting to show/hide notification filter bar (#1314)
* Add setting to show/hide notification filter bar tuskyapp/Tusky#1306

* Remove not required requestLayout

* Fix notifications reload issue
2019-06-11 16:41:15 +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
Konrad Pozniak 8f57dddd61
fix poll voting in NotificationFragment (#1234) 2019-05-03 20:42:13 +02:00
Konrad Pozniak 28a76c1a5f
Notification filtering fixes (#1232)
* fix popup menu not shown on Android 5

* use correct no button for notification clearing confirmation dialog
2019-05-03 20:41:55 +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
Konrad Pozniak fd7471f2ab
Polls part 1 - displaying in timelines and voting (#1200)
* add entity classes

* change data models and add database migration

* add polls to StatusViewData

* show poll results

* add methods for vote handling

* add voting interface

* enable voting in TimelineFragment

* update polls immediately

* enable custom emojis for poll options

* enable voting from search fragment

* add voting layout to detailed statuses

* fix tests

* enable voting in ViewThreadFragment

* enable voting in ConversationsFragment

* small refactor for StatusBaseViewHolder
2019-04-22 10:11:00 +02:00
Konrad Pozniak ef66deeae7 fix some lint warnings 2019-04-21 08:24:29 +02:00
Konrad Pozniak 1ae3e86378
remove unneeded CollectionUtil and Either.java (#1201) 2019-04-21 08:24:06 +02:00
Bernd 84f561af17 confirm delete notifications (#1186)
* confirm delete notificaitons

* Use same strings as website

* Cleanup
2019-04-12 00:13:06 +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
pandasoft0 01234bb94b Add ability to scroll to top by tab click at the Account activity (#1146)
* Issue: tuskyapp#1078
Add ability to scroll to top by tab click at the Account activity

* Fix issue with scroll tabs other than current

* Update scroll on click behavior

* Update code formatting

* Remove unused code

* Move tab click listener from Fragments to Activities
2019-04-08 15:40:16 +02:00
Konrad Pozniak dd02af9911
fix IndexOutOfBoundException caused by ListStatusAccessibilityDelegate (#1178) 2019-04-07 16:32:58 +02: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
Konrad Pozniak 08c1bbd253
fix crash in NotificationsFragment (#1119)
* fix crash in NotificationsFragment

* don't reload notifications

* add updateAdapter()
2019-03-13 09:32:59 +01:00
Konrad Pozniak 5f390b378b
Improve Dependency Injection (#1120)
* inject TimelineCases directly into SFragment

* inject ThemeUtils
2019-03-11 17:25:11 +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
Ivan Kupalov 479d210e64 Timeline a11y (#1059)
* Improve timeline accessibility

* Improve a11y description and actions in timeline

* Refactor timeline accessibility handling, add more actions

* Update app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java

Co-Authored-By: charlag <charlag@tutanota.com>

* Add a11y actions for links, hashtags and mentions, enable for detailed.

* A11y delegate: Add open reblogger action, cleanup

* a11y delegate: add reblogs/boosts, improve interrupts

* a11y delegate: add reblogs/boosts, improve interrupts

* a11y delegate: add to notifications fragment
2019-03-04 19:24:27 +01:00
Konrad Pozniak 5ee78e68ba
remove unnecessary divider styling (#1057) 2019-02-26 18:28:20 +01:00
Konrad Pozniak e371fa0e24
Tab customization & direct messages tab (#1012)
* custom tabs

* custom tabs interface

* implement custom tab functionality

* add database migration

* fix bugs, improve ThemeUtils nullability handling

* implement conversationsfragment

* setup ConversationViewHolder

* implement favs

* add button functionality

* revert 10.json

* revert item_status_notification.xml

* implement more menu, replying, fix stuff, clean up

* fix tests

* fix bug with expanding statuses

* min and max number of tabs

* settings support, fix bugs

* database migration

* fix scrolling to top after refresh

* fix                                 bugs

* fix warning in item_conversation
2019-02-12 19:22:37 +01:00
Ivan Kupalov 22ee1dc5df Fix IDs (#1016)
* Allow any String IDs as long as they're sortable

* Allow any String IDs as long as they're sortable
2019-01-31 19:03:34 +01:00
Ivan Kupalov c0c73f5c06 Error artwork (#1000)
* Add new Elephant Friend images. Use them in ListsActivity.

* Add error images to AccountListFragment

* Add error images to Timeline & Notifications fragment. Needs rework.

* Introduce BackgroundMessageView. Use it in AccountList.

* Use correct button style for BackgroundMessageView

Co-Authored-By: charlag <charlag@tutanota.com>

* Use BackgroundMessageView

* Add BackgroundMessageView docs

* Re-color and document elephants

* Apply feedback, disable refresh when error is shown

* Fix string typo
2019-01-28 19:02:31 +01:00
Conny Duck fa0ee82fe4 fix build 2019-01-14 22:29:12 +01:00
Ivan Kupalov 3ab78a19bc Caching toots (#809)
* Initial timeline cache implementation

* Fix build/DI errors for caching

* Rename timeline entities tables. Add migration. Add DB scheme file.

* Fix uniqueness problem, change offline strategy, improve mapping

* Try to merge in new statuses, fix bottom loading, fix saving spans.

* Fix reblogs IDs, fix inserting elements from top

* Send one more request to get latest timeline statuses

* Give Timeline placeholders string id. Rewrite Either in Kotlin

* Initial placeholder implementation for caching

* Fix crash on removing overlap statuses

* Migrate counters to long

* Remove unused counters. Add minimal TimelineDAOTest

* Fix bug with placeholder ID

* Update cache in response to events. Refactor TimelineCases

* Fix crash, reduce number of placeholders

* Fix crash, fix filtering, improve placeholder handling

* Fix migration, add 8-9 migration test

* Fix initial timeline update, remove more placeholders

* Add cleanup for old statuses

* Fix cleanup

* Delete ExampleInstrumentedTest

* Improve timeline UX regarding caching

* Fix typos

* Fix initial timeline update

* Cleanup/fix initial timeline update

* Workaround for weird behavior of first post on initial tl update.

* Change counter types back to int

* Clear timeline cache on logout

* Fix loading when timeline is completely empty

* Fix androidx migration issues

* Fix tests

* Apply caching feedback

* Save account emojis to cache

* Fix warnings and bugs
2019-01-14 22:05:08 +01:00
Ivan Kupalov fb83d086d1 Fix unnecessary reloading of notifications (#984)
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.
2019-01-11 22:07:40 +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 348c20c792
New settings (#891)
* change drawer items

* rename SettingsActivity

* introduce AccountSettings activity

* improve account settings, move notification settings

* sync settings with server

* rename settings back to preferences

* add functionality for settings

* move mediaPreviewEnabled preference to AccountPreferences

* replace shared prefs with accountmanager

* move PreferencesFragment to support library

* split preferences fragment into smaller fragments,
merge AccountPreferencesActivity into PreferencesFragment

* adjust icon size, add icons to general preferences

* change mediaPreviewEnabled and alwaysShowSensitiveMedia pref position

* add database migration

* remove pullNotificationCheckInterval option

* fix  preference in TimelineFragment

* Update Chinese translations. (#915)

* Update zh-CN translations.

* Update zh-SG translations.

* Update zh-TW translations.

* Update zh-MO translations.

* Update zh-HK translations.

* Fix errors in zh-CN translations.

* Fix errors in zh-SG translations.

* Fix errors in zh-TW translations.

* Fix errors in zh-MO translations.

* Fix errors in zh-HK translations.
2018-11-12 21:09:39 +01:00
Konrad Pozniak c37dbd15af
fix notifications loading (again) (#845)
* fix notifications loading (again)

* Revert "fix notifications loading (again)"

This reverts commit 226710fabf5175d4f6a2103c6896bcfe37e3230e.

* fix notification loading (this time for really real)
2018-09-28 17:14:37 +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
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
Conny Duck f72e08cae4 fix crash in notifications fragment, save account only when notificationid changed 2018-09-03 21:23:12 +02:00
Konrad Pozniak b579a9baea
fix notification tab loading bottom notifications forever (#807) 2018-08-26 21:10:38 +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 219eafe6fc Prevent query SharedPreference in adapters. 2018-08-17 14:42:15 +09:00
Konrad Pozniak 8930d277e6
add new elephant friends (#757)
* add new elephant friends

* add art license

* fix typo
2018-08-15 20:51:35 +02:00
Conny Duck 6f179fccaa fix crash in TimelineFragment 2018-07-12 21:21:53 +02:00
Ivan Kupalov 3756a1fd20
Add EventHub, add fav, reblog events, improve timelines (#562)
* Add AppStore, add fav, reblog events

* Add events, add handling to Timeline

* Add event handling to Notifications

* Mostly finish events

* Fix unsubscribing

* Cleanup timeline

* Fix newStatusEvent in thread, fix deleteEvent

* Insert new toots only in specific timelines

* Add missing else

* Rename AppStore to EventHub

* Fix tests

* Use DiffUtils for timeline

* Fix empty timeline bug. Improve loading placeholder

* Fix AsyncListDiff, loading indicator, "load more"

* Timeline fixes & improvements.

Fix infinite loading. Remove spinner correctly.
Don't refresh timeline without need.
2018-05-27 11:22:12 +03:00
Ivan Kupalov 23d84dfa66 Show image descriptions in gallery (#630)
* Add circleci

* Commit to maybe fix ci

* Suppress false positives in lint

* Disable linting for tests in ci

* Add image descriptions to gallery

* Fix test

* [CI] Attempt to fix OOM error

* [CI] Attempt to fix OOM error, 2

* Add option to open status from media

* fix theme issue

* increase linespacing on media description
2018-05-10 20:13:25 +02:00
Konrad Pozniak 27b4cf8739
1.8 fixes (#637)
* fix lint warnings

* upgrade dependencies

* auto cancel notifications

* improve dependency injection

* fix tests

* remove old comment from BaseActivity

* fix missing injectors
2018-05-08 19:15:10 +02:00
Levi Bard 76eae44324 View links to statuses inside Tusky (#568)
* View links to statuses inside Tusky

* Only attempt to open links that look like mastodon statuses

* Add support for pleroma statuses

* Move "smells like mastodon" url check to click handler

* Add bottom sheet to notify users of post query status

* Improve architecture for managing search status

* Push everything into SFragment

* Add external lookup for non-locally-resolved account links

* Clean up copypasta from LinkHelper.setClickableText

* Apply PR feedback

* Migrate bottom sheet wrappers to CoordinatorLayout
2018-04-25 20:04:55 +02:00
Konrad Pozniak b4ba457d89
Dependency injection improvement (#596)
* inject MastodonApi into LoginActivity

* inject AccountManager into MainActivity

* inject AccountManager into SplashActivity, convert to Kotlin

* inject AccountManager into AccountActivity

* inject AccountManager into LoginActivity

* inject AccountManager into NotificationsFragment and NotificationClearBroadcastReceiver, fix MainActivity

* ooops

* use same OkHttpClient for Retrofit & Picasso

* fix ordering of okhttp interceptors

* remove dependencies on TuskyApplication

* bugfix
2018-04-22 17:20:01 +02:00