Commit Graph

485 Commits

Author SHA1 Message Date
Nik Clayton 8eb195cff6
Enable robolectric logging (#3143)
Robolectric normally swallows output from `Log.*` calls in tests and
the code under test. This can make debugging failing tests more
difficult than it needs to be.

Set `robolectric.logging.enabled` to `true` to enable the logs.
2023-01-12 19:10:11 +01:00
kyori19 6fc61a79e5
Bump version to v4.4.2 (52) 2022-12-29 22:56:12 +09:00
Konrad Pozniak 59c24381a3
replace Manifest package with Gradle namespace (#3007) 2022-12-06 20:32:26 +01:00
Konrad Pozniak 564caf4e9d
don't include dependency info in apk (#2995) 2022-12-05 19:13:15 +01:00
Konrad Pozniak b53f097d45 Release 97 2022-11-30 20:01:33 +01:00
Conny Duck 8437fbd605 Release 96 2022-11-25 19:11:54 +01:00
Conny Duck 8ee69df29a Release 95 2022-11-19 19:42:50 +01:00
kyori19 eb622def99
Bump version to v4.4.1 (51) 2022-11-15 22:53:22 +09:00
kyori19 8c4744417b
Bump version to v4.4.0 (50) 2022-11-12 23:33:17 +09:00
kyori19 94daa79cbd
Bump version to v4.3.0 (49) 2022-11-12 04:50:37 +09:00
kyori19 004a9b4921
Merge remote-tracking branch 'tuskyapp/develop' 2022-11-12 04:35:49 +09:00
Eva Tatarka b39cb06748
Navigate to the Follow Requests page from notification (#2757)
* Navigate to the Follow Requests page from notification

Fixes #2655

* Fix lock status
2022-11-07 20:04:07 +01:00
Colin Lee 3fb1173d3f
Introduce Gradle version catalogs for versioning (#2745)
* Introduce Gradle version catalogs for versioning

* Correct some versions for version catalogs
2022-11-04 20:10:26 +01:00
Konrad Pozniak d17a0c43ab
Api 33 support (#2719)
* update to Api 33, fix some deprecations

* fix deprecated serializable/parcelable methods

* ask for notification permission

* fix code formatting

* add back comment in PreferencesActivity
2022-11-04 19:22:38 +01:00
Konrad Pozniak ffe42c992f
update okhttp to 4.10.0 (#2696) 2022-09-13 19:48:20 +02:00
Konrad Pozniak 9beea540de
upgrade glide to 4.13.2 (#2673) 2022-08-16 20:33:19 +02:00
Konrad Pozniak 95191bbb8d
upgrade glide animation plugin to 2.23.0 (#2674) 2022-08-16 20:09:40 +02:00
Konrad Pozniak 19ef80432a
upgrade unified push connector to 2.0.1 (#2672) 2022-08-16 20:08:23 +02:00
Konrad Pozniak 94ae64b52d
upgrade android image cropper to 4.3.1 (#2669) 2022-08-16 20:06:59 +02:00
Konrad Pozniak 46278636f4
upgrade mockito-inline to 4.7.0 (#2668) 2022-08-16 20:06:48 +02:00
Konrad Pozniak 3c7bfb7047
upgrade okhttp to 4.10.0 (#2666) 2022-08-16 20:06:22 +02:00
Konrad Pozniak 30c87e04e2
upgrade dagger to 2.43.2 (#2665) 2022-08-16 20:06:00 +02:00
Levi Bard decd8a0f4b
Upgrade robolectric (#2664)
* Upgrade robolectric to 4.8.1

* Make TimelineDAO cleanup test deterministic
2022-08-15 11:01:17 +02:00
Konrad Pozniak 1c11671f3e
update kotlin coroutines to 1.6.4 (#2648) 2022-08-07 19:36:20 +02:00
Konrad Pozniak 68c9870b19
update AndroidX dependencies (#2641)
* update AndroidX dependencies

* fix ComposeActivityTest
2022-08-07 19:13:59 +02:00
Konrad Pozniak 55796c9a30
update minSdkVersion to 23 (#2638)
closes #2606
2022-08-04 16:48:26 +02:00
kyori19 bbf104ad4e
Bump version to v4.2.1 (48) 2022-08-04 07:40:53 +09:00
Constantin A 25f637f0a8
Set FilemojiCompat to version 3.2.3 (#2611) 2022-07-25 12:36:35 +02:00
kyori19 57aab71b0e
Merge remote-tracking branch 'tuskyapp/develop'
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt
#	app/src/main/java/com/keylesspalace/tusky/components/conversation/ConversationViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/components/search/SearchViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/TimelineTypeMappers.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt
#	app/src/main/res/layout/activity_main.xml
#	app/src/main/res/values-cs/strings.xml
#	app/src/main/res/values-de/strings.xml
#	app/src/main/res/values-fa/strings.xml
#	app/src/main/res/values-fr/strings.xml
#	app/src/main/res/values-hu/strings.xml
#	app/src/main/res/values-it/strings.xml
#	app/src/main/res/values-no-rNB/strings.xml
#	app/src/main/res/values-zh-rCN/strings.xml
2022-07-16 02:51:51 +09:00
Conny Duck 3ae18fd923 Release 94 2022-07-11 18:41:21 +02:00
Conny Duck 3a4a7d8701 Release 93 2022-07-05 18:30:57 +02:00
Konrad Pozniak 86403ac6dc
add test for InstanceSwitchAuthInterceptor and convert it to Kotlin (#2596)
* add test for InstanceSwitchAuthInterceptor

* improve InstanceSwitchAuthInterceptorTest

* Rename .java to .kt

* convert InstanceSwitchAuthInterceptor to Kotlin

* fix ktlint issues

* improve InstanceSwitchAuthInterceptorTest

* improve InstanceSwitchAuthInterceptorTest
2022-06-30 21:25:44 +02:00
Conny Duck 0375aa1d18 release 92 2022-06-20 17:05:22 +02:00
Konrad Pozniak e1c8461423
replace kotlin-result-calladapter with networkresult-calladapter (#2569)
* replace kotlin-result-calladapter with networkresult-calladapter

* fix tests
2022-05-30 20:03:40 +02:00
Konrad Pozniak 579f0eb833
update android animation glide plugin to 2.22.0 (#2557) 2022-05-29 19:21:44 +02:00
Constantin A 9139e7bbf1
Set FilemojiCompat to version 3.2.2 (#2553) 2022-05-25 20:55:00 +02:00
mcclure 00c139190e
Ability to crop images attached to posts (#2531)
* First attachment crop attempt: Can crop in place, but does not delete/replace on server so has no effect

* Attachment crop feature works

* ktlint fixes on attachment crop patch

* Upgrade Android-Image-Cropper to 4.2.1

* An error message should be displayed if attachment cropping fails and it is not because the user intentionally cancelled.

* Remove 2 of the 3 "state passing" variables by using MediaUtils

* Cropper should use content uri (MIME type bearing) and setOutputCompressFormat so that PNGs reach the server safely.

* Change to crop requested by Conny: Store inflight cropImageItemOld in view model

* Change to crop requested by Conny: Sort cropImage with the other contracts

* ktlint fixes on attachment crop patch (again)
2022-05-22 21:01:14 +02:00
kyori19 e461e7fabf
Bump version to v4.2.0 (47) 2022-05-19 22:02:51 +09:00
kyori19 25bee533f1
Merge remote-tracking branch 'tuskyapp/develop'
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/entity/Account.kt
#	app/src/main/res/values-zh-rCN/strings.xml
#	app/src/main/res/values-zh-rTW/strings.xml
#	app/src/main/res/values/strings.xml
2022-05-19 02:42:27 +09:00
kyori19 f7972d5ce6
Bump version to v4.1.6 (46) 2022-05-19 00:20:02 +09:00
Konrad Pozniak bdd94d43c5
update android material to 1.6.0 (#2524) 2022-05-17 19:56:12 +02:00
Konrad Pozniak 7a5175c266
update dagger to 2.42 (#2523) 2022-05-17 19:55:58 +02:00
Peter Cai 9ec5d6e3b0
Push notifications support via UnifiedPush (#2303)
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.
2022-05-17 19:32:09 +02:00
Conny Duck 20f3ec921f Release 91 2022-05-17 19:24:17 +02:00
mcclure 4159826f26
Allow build on systems without git (#2514)
Set git revision to "unknown" if git not available.
2022-05-11 17:16:51 +02:00
Conny Duck 7db504775c Release 90 2022-05-10 20:00:53 +02:00
kyori19 1d5c2bdaeb Bump version to v4.1.5 (45) 2022-05-02 10:00:38 +09:00
kyori19 95a1f5632b
Merge remote-tracking branch 'tuskyapp/develop' 2022-05-01 19:54:22 +09:00
Constantin A f15b3e61bb
New emoji picker (#2395)
* Update to Emoji2

* Hopefully fix the emoji picker preference

* Switch to released Filemojicompat version

* Filemojicompat version as an own var

* Remove an unused import

* Small cleanup

* Correct onDisplayPreferenceDialog; test TuskyApplication

* Use TextViews instead of EmojiTextViews

* Recreate the Main Activity if the emoji pack is updated

* Enable coreLibraryDesugaring (for Java Streams); update Filemojicompat, downgrade Emoji2

* Update emoji font versions to 14

* Use FilemojiCompat 3.2.0-beta01

* Make ktLint happy again

* Remove coreLibraryDesugaring and a FIXME

* Use EmojiPickerPreference.get()

* Disable emoji pack import

* Update FilemojiCompat to Beta 2

* Update FilemojiCompat to Beta 3

* Update FilemojiCompat to Beta 3.2.0 final

* Update FilemojiCompat to 3.2.1
2022-04-26 18:50:58 +02:00
kyori19 6c630e08dd Merge remote-tracking branch 'tuskyapp/develop' 2022-04-24 16:42:54 +09:00
Konrad Pozniak d2bfceae7b
refactor compose & announcements to coroutines (#2446)
* refactor compose & announcements to coroutines

* fix code formatting

* add javadoc to InstanceInfoRepository

* fix comments in ImageDownsizer

* remove unused Either extensions

* add explicit return type for InstanceInfoRepository.getEmojis

* make ComposeViewModel.pickMedia return Result

* cleanup code in ImageDownsizer
2022-04-21 18:46:21 +02:00
Konrad Pozniak f2fc87a79e
upgrade Kotlin and Coroutines (#2434) 2022-04-16 09:44:37 +02:00
Konrad Pozniak ffbc4b6403
upgrade Kotlin Result CallAdapter to v1.0.1 to fix crash (#2433) 2022-04-15 11:00:36 +02:00
Konrad Pozniak 3e8c6a318a
introduce KotlinResultCallAdapter for nice suspending network calls (#2415)
* introduce KotlinResultCallAdapter for nice suspending network calls

* fix tests
2022-04-14 19:49:49 +02:00
Conny Duck 0c840a706d Release 89 2022-04-14 19:07:17 +02:00
kyori19 060c465e72 Bump version to v4.1.4 (44) 2022-04-13 14:12:32 +09:00
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Konrad Pozniak d4eeef99d0
upgrade splashscreen library to 1.0.0-beta02 (#2416) 2022-04-04 10:10:23 +02:00
Conny Duck 71739ba87f Release 88 2022-03-28 19:28:38 +02:00
Konrad Pozniak 2017d0b13b
update glide animation plugin to 2.20.0 (#2401) 2022-03-23 19:14:41 +01:00
Konrad Pozniak 6e4a9fb0e6
upgrade glide animation plugin to 2.18.0 (#2387) 2022-03-15 19:37:29 +01:00
Konrad Pozniak 38eded4efb
update dependencies (#2381) 2022-03-13 16:08:27 +01:00
Konrad Pozniak 55513e8e2b
Android 12 support, update AndroidX libraries (#2367)
* Android 12 support, update AndroidX libraries

* fix ktlint

* add Android 12 splash screen support

* fix comments in MainActivity

* remove deprecated Intent.ACTION_CLOSE_SYSTEM_DIALOGS

* delete TimelineViewModelTest

* fix notifications on Android 12

* improve splash screen

* handle pending intent flags in a dedicated function
2022-03-09 20:50:23 +01:00
kyori19 d809514003 Bump version to v4.1.3 (43) 2022-03-08 06:20:03 +09:00
kyori19 3bce970bee Bump version to v4.1.2 (42) 2022-03-07 16:19:47 +09:00
kyori19 49644436d0 Bump version to v4.1.1 (41) 2022-03-06 19:36:42 +09:00
kyori19 dd4b74900d Update targetSdkVersion 2022-03-04 18:08:04 +09:00
kyori19 3b6f04aeed Bump version to v4.1.0 (40) 2022-03-04 18:07:08 +09:00
kyori19 ba005c769b Merge remote-tracking branch 'tuskyapp/develop' 2022-03-04 17:51:25 +09:00
kyori19 8e49dd7329 Merge commit '643e012b11f20538fd17aa3ab888d8e739ebd0d0' 2022-03-04 16:29:48 +09:00
kyori19 4a8fa74f79 Merge commit '224161caf111a15887cbc8a419763e87fe69931d' 2022-03-04 00:37:23 +09:00
Konrad Pozniak a6335e6bcd
update Android Image Cropper and get rid of deprecated onActivityResult (#2351)
* update Android Image Cropper and get rid of deprecated onActivityResult

* add comment why skipping caches is necessary

* inject application into EditProfileViewModel instead of passing it everytime
2022-03-02 20:39:56 +01:00
Conny Duck fcc9265703 Release 87 2022-02-25 18:42:31 +01:00
Conny Duck 25263b15ca Release 86 2022-02-21 19:46:33 +01:00
Conny Duck b99e421786 Release 85 2022-02-09 20:59:13 +01:00
Conny Duck b21e2256ea Release 84 2022-02-08 19:34:02 +01:00
Konrad Pozniak 1586817c3d
Update gradle, kotlin and other dependencies (#2291)
* update gradle, kotlin and other dependencies

* fix new warnings

* remove unused import

* update Proguard rules

* add explicit dependency on Gson to get the newest version

* remove debug flag from proguard rules again

* fix typo
2022-01-20 21:10:32 +01:00
Konrad Pozniak 643e012b11
Timeline paging (#2238)
* 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
2022-01-11 19:00:29 +01:00
Konrad Pozniak d1d564a7e2
support animated PNGs and WEBPs (#2244) 2021-10-09 10:45:41 +02:00
kyori19 dbabac7592 Bump version to v4.0.1 (39) 2021-09-24 23:48:21 +09:00
kyori19 3a4386d906 Bump version to v4.0.0 (38) 2021-08-12 11:45:48 +09:00
kyori19 b2ba778f14 Bump version to v4.0.0-beta.1 (37) 2021-08-04 01:24:12 +09:00
kyori19 fe6b192a1c Bump version to v4.0.0-beta.0 (36) 2021-08-04 00:35:23 +09:00
kyori19 9899b99e1e Bump version to v3.7.6 (35) 2021-07-31 13:40:44 +09:00
kyori19 2005b32dfa Merge remote-tracking branch 'tuskyapp/develop' 2021-07-03 23:59:57 +09:00
Konrad Pozniak 6d4f5ad027
migrate to paging 3 (#2182)
* migrate conversations and search to paging 3

* delete SearchRepository

* remove unneeded executor from search

* fix bugs in conversations

* update license headers

* fix conversations refreshing

* fix search refresh indicators

* show fullscreen loading while conversations are empty

* search bugfixes

* error handling

* error handling

* remove mastodon bug workaround

* update ConversationsFragment

* fix conversations more menu and deleting conversations

* delete unused class

* catch exceptions in ConversationsViewModel

* fix bug where items are not diffed correctly / cleanup code

* fix search progressbar display conditions
2021-06-17 18:54:56 +02:00
Konrad Pozniak e84dec29b2
update dependencies (#2198) 2021-06-14 11:00:25 +02:00
Ivan Kupalov 44a5b42cac
Timeline refactor (#2175)
* Move Timeline files into their own package

* Introduce TimelineViewModel, add coroutines

* Simplify StatusViewData

* Handle timeilne fetch errors

* Rework filters, fix ViewThreadFragment

* Fix NotificationsFragment

* Simplify Notifications and Thread, handle pin

* Redo loading in TimelineViewModel

* Improve error handling in TimelineViewModel

* Rewrite actions in TimelineViewModel

* Apply feedback after timeline factoring review

* Handle initial failure in timeline correctly
2021-06-11 20:15:40 +02:00
Konrad Pozniak 3301643c1d
update to SDK 30 and fix deprecations (#2173)
* update to SDk 30 and fix deprecations

* remove unnecessary .run

* revert ViewMediaActivity change
2021-06-01 19:46:07 +02:00
Conny Duck 3091db8c27 Merge branch 'main' into develop 2021-05-31 14:25:40 +02:00
Conny Duck a85568abdf Release 83 2021-05-31 14:25:19 +02:00
Konrad Pozniak 8b56e9bc27
update Glide to 4.12.0 (#2169) 2021-05-22 18:41:28 +02:00
Konrad Pozniak ca5c455881
update AndroidX, use ActivityResultContracts (#2170)
* update AndroidX, use ActivityResultContracts

* make allowMultiple setable in PickMediaFiles

* add license headers to PickMediaFiles
2021-05-22 17:50:08 +02:00
Konrad Pozniak d2cdaae129
update okhttp to 4.9.1 (#2168) 2021-05-22 17:48:17 +02:00
Konrad Pozniak a1dfbee669
update dagger to 2.35.1 (#2167) 2021-05-22 17:48:00 +02:00
Konrad Pozniak 387e62ea4b
get rid of jcenter (#2163)
* get rid of jcenter

* fix BottomSheetActivityTest

* update Android Image Cropper license
2021-05-21 17:51:47 +02:00
Konrad Pozniak 751109ac39
upgrade kotlin to 1.5.0 (#2162)
* upgrade kotlin to 1.5.0

* don't explicitly set kotlin jvmtarget
2021-05-21 17:51:35 +02:00
Konrad Pozniak 3af8874b87
upgrade android gradle plugin to 4.2.1 (#2160)
* upgrade android gradle plugin to 4.2.1

* upgrade android gradle plugin to 4.2.1
2021-05-19 07:40:45 +02:00
Konrad Pozniak 40b24cd242
migrate to RxJava3 (#2146)
* migrate to RxJava3

* remove unused import
2021-05-16 19:53:27 +02:00
Conny Duck cb3840c699 Release 82 2021-05-16 18:53:34 +02:00