Commit graph

56 commits

Author SHA1 Message Date
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
Ivan Kupalov a5cffe0fea Add Dagger (#554)
* Add Dagger DI

* Preemptively fix tests

* Add missing licenses

* DI fixes

* ci fixes
2018-03-27 19:47:00 +02:00
Ivan Kupalov 28e46c9cc0 Add ComposeActivity tests. Add ServiceLocator (#542) 2018-03-09 22:02:32 +01:00
Conny Duck 4e617dccc7 change the color of all SwipeRefreshLayouts to match the Tusky theme 2018-03-09 20:39:08 +01:00
Konrad Pozniak 71954a277e
convert entity classes to Kotlin data classes (#526)
* convert entity classes to Kotlin data classes

* more data classes, code style
2018-03-03 13:24:03 +01:00
Konrad Pozniak 92ae463b38
Multi account feature (#490)
* basic implementation

* improve LoginActivity

* darken drawer background image

* add current avatar in ComposeActivity

* add account name to logout dialog

* multi account support for notifications

* multi account support for notifications

* bugfixes & cleanup

* fix bug where somethings notifications would open with the wrong user

* correctly set active account in SFragment

* small improvements
2018-02-03 22:45:14 +01:00
Conny Duck 7abd8c8d70 fix some lint warnings 2017-12-01 22:31:34 +01:00
Conny Duck 7cc1ed9844 fix problem with spark buttons behaving weirdly 2017-12-01 22:13:47 +01:00
Konrad Pozniak 41233a837b
UI Improvements (#445)
UI Improvements
2017-11-30 20:12:09 +01:00
Konrad Pozniak 3204223af7
fix clear notifications crash (#458) 2017-11-15 21:18:35 +01:00
Ivan Kupalov ddc4954f8a Cancel notifications on opening notifications tab (#450) 2017-11-13 19:05:23 +01:00
charlag 92fb55cb3a Open status from notifications 2017-11-07 22:36:19 +03:00
Conny Duck 52dd9559d6 fix placeholder not resetting itself after a load failed 2017-11-07 12:59:46 +01:00
charlag 74d6736afc Make status placeholder abstraction cleaner 2017-11-07 12:44:19 +01:00
charlag 0dede1ba7d Make more clear representation of placeholder in notifications 2017-11-07 12:44:19 +01:00
Conny Duck 80a10c1ac1 implement "load more" placeholder 2017-11-04 21:57:30 +01:00
Conny Duck 9dd09d0522 fix a bug where favs & reblogs where not shown correctly in NotificationsFragment 2017-10-27 23:39:36 +02:00
Conny Duck f2f3be37b3 cleanup code, remove some unneeded files 2017-10-18 00:20:50 +02:00
Conny Duck f696b6e8d3 bugfix, layout improvements 2017-08-05 12:04:40 +02:00
Conny Duck 099d76d919 make FAB hide on scroll in AccountActivity as well 2017-08-04 11:44:10 +02:00
Vavassor 3f8378ae3a Fixes a crash when a timeline or thread is backgrounded and brought back with an uninitialized notification or status list. 2017-07-20 21:17:36 -04:00
Ivan Kupalov 08f928a2b2 Improve media browser and video viewer
* show/hide status bar by tapping a photo
* dim and color status bar in video/media viewers
* show/hide status bar in video viewer
* use shared element transition when opening a photo is possible
* center video in VideoView
2017-07-15 18:37:53 +03:00
Vavassor 87600b016f Removes unused icons and does bits of cleanup. 2017-07-14 23:23:14 -04:00
Vavassor 96cba0cc2b Fixes timelines and notifications tabs fetching progressively further down when they are restarted. 2017-07-14 17:09:44 -04:00
Henri Gourvest 0945b881f5 avoid crash when new notification list is empty 2017-07-14 11:11:38 +02:00
Vavassor a23cca7047 Re-does commit 5754a3a177 because those changes were stomped by merging in commit fc1a24be11. 2017-07-13 21:39:17 -04:00
Vavassor fc1a24be11 Resolves merge conflicts and makes NotificationAdapter no longer implement AdapterItemRemover 2017-07-13 21:31:31 -04:00
Ivan Kupalov 90c1a83ba4 Preserve status states on updates. UI layer refactoring.
Some things were pulled out of adapters to fragments. New classes were introduced - StatusViewData and NotificationViewData. They not only have view state in them but also help decoupling.
Because introducing parallel model list requires a lot of synchronisation PairedList was added.
Also synchronisation between fragments and adapters is quiet tedious and error-prone and should be replaces with better solution.
Oh, I also couldn’t resist and fixed bug with buttons animation in the same commit.
2017-07-13 22:18:08 +03:00
Ivan Kupalov 0f15509345 Add boost click handling 2017-07-02 09:55:20 +03:00
Vavassor afa21f5a5c Makes end of list footers have zero height. 2017-07-01 23:23:42 -04:00
Vavassor 275cd51a6d Adds correct footer behaviour to account lists and unifies it with how timelines use them. 2017-06-30 18:30:25 -04:00
Vavassor 3955649b9c Moves loading of accounts, notifications, and statuses to use link headers. Also remedies an issue where duplicate calls for the same chunk of items in a list can occur. 2017-06-30 02:31:58 -04:00
Vavassor 3f54ead962 Adds option to hide media previews if reduced data usage is desired Closes #56. 2017-06-26 05:15:47 -04:00
Vavassor e3745ebd6b Adds ability to page between multiple images in a status by swiping from left to right. Closes #66 2017-06-25 01:07:41 -04:00