Commit Graph

133 Commits

Author SHA1 Message Date
kyori19 eeb6c3c96b
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/adapter/StatusBaseViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt
#	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/search/SearchViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt
#	app/src/main/java/com/keylesspalace/tusky/db/TimelineStatusEntity.kt
#	app/src/main/java/com/keylesspalace/tusky/di/NetworkModule.kt
#	app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java
#	app/src/main/java/com/keylesspalace/tusky/service/SendStatusService.kt
#	app/src/main/java/com/keylesspalace/tusky/util/ThemeUtils.java
#	app/src/main/res/layout/item_status_detailed.xml
#	app/src/main/res/values-cy/strings.xml
#	app/src/main/res/values-de/strings.xml
#	app/src/main/res/values-es/strings.xml
#	app/src/main/res/values-fa/strings.xml
#	app/src/main/res/values-hu/strings.xml
#	app/src/main/res/values-it/strings.xml
#	app/src/main/res/values-ja/strings.xml
#	app/src/main/res/values-nb-rNO/strings.xml
#	app/src/main/res/values-oc/strings.xml
#	app/src/main/res/values-tr/strings.xml
#	app/src/main/res/values-zh-rCN/strings.xml
#	app/src/main/res/values/strings.xml
#	fastlane/metadata/android/sv/changelogs/74.txt
#	fastlane/metadata/android/tr/changelogs/58.txt
#	gradle/libs.versions.toml
2023-01-29 04:44:17 +09:00
kyori19 5be9a90333
Merge remote-tracking branch 'tuskyapp/develop' 2022-12-29 22:53:20 +09:00
Konrad Pozniak 59c24381a3
replace Manifest package with Gradle namespace (#3007) 2022-12-06 20:32:26 +01:00
Levi Bard 9362e59d9d
Add view for browsing and unfollowing followed hashtags (#2794)
* Add view for browsing and unfollowing followed hashtags.
Implements #2785

* Improve list interface

* Remove superfluous suspend modifier

* Migrate to paginated loading for followed tags view

* Update app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsViewModel.kt

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>

* Fix unhandled exception when opening the followed tags view while offline

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2022-12-01 19:24:27 +01:00
Konrad Pozniak 667a728dd5
fix media permissions on Android 10+ (#2837) 2022-11-16 20:43:49 +01:00
Konrad Pozniak c96a81571c
support Android 13 per-app languages (#2829)
* support Android 13 per-app languages

* fix tests

* fix language ids in locales_config.xml

* fix language setting default in ComposeActivity
2022-11-16 19:45:18 +01:00
kyori19 004a9b4921
Merge remote-tracking branch 'tuskyapp/develop' 2022-11-12 04:35:49 +09:00
Eva Tatarka 4bf541932a
Handle config changes for video playback (#2754)
Fixes #2419
2022-11-07 19:57:13 +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 eb167c623b
new app icon (#2695)
* new app icon

* make icon in readme a bit smaller
2022-09-13 19:48:09 +02:00
Konrad Pozniak 741461acde
rewrite threads with Kotlin & coroutines (#2617)
* initial class setup

* handle events and filters

* handle status state changes

* code formatting

* fix status filtering

* cleanup code a bit

* implement removeAllByAccountId

* move toolbar into fragment, implement menu

* error and load state handling

* fix pull to refresh

* implement reveal button

* use requireContext() instead of context!!

* jump to detailed status

* add ViewThreadViewModelTest

* fix ktlint

* small code improvements (thx charlag)

* add testcase for toggleRevealButton

* add more state change testcases to ViewThreadViewModel
2022-08-15 11:00:18 +02:00
Konrad Pozniak 55796c9a30
update minSdkVersion to 23 (#2638)
closes #2606
2022-08-04 16:48:26 +02: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
Konrad Pozniak 9a84d14f19
add app category to AndroidManifest (#2513) 2022-05-17 19:55:46 +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
kyori19 6c630e08dd Merge remote-tracking branch 'tuskyapp/develop' 2022-04-24 16:42:54 +09:00
Konrad Pozniak b4a913b2d5
fix black theme on Android 12 (#2424)
* fix black theme on Android 12

* Revert "fix black theme on Android 12"

This reverts commit 2286706fdb239e15be72ac8943405ffeb2258219.

* bring back SplashActivity
2022-04-13 19:22:01 +02:00
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Konrad Pozniak d9931e3d2c
Rename Toots to Posts (#2396)
* rename toots -> posts in strings

* extract tusky_compose_post_quicksetting_label string

* rename toot -> status in code
2022-03-20 20:21:42 +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
Ivan Kupalov 4d8289b245
Implement Login via WebView (#2371)
* Improve login process with newer APIs

* Implement login with WebView instead of browser tab or external browser

Oauth process requires us to open login prompt for correct instance and
we need to receive the result back. Usually it is done with redirect
parameter.

Previously we've been using BrowserTabs API and have been falling back
to just opening browser. This mostly worked but is very clumsy:

 - It relies on few system mechanisms for opening URLs in both
directions
 - Browsers do weird things and tend to break quite a bit
 - There's a good chance that the app can die in the process and we need
to recover our state.

So instead we are now using WebView. It has disadvantages (users have
to trust us to show correct page, logins are not shared w/ browser) but
it should be more reliable.

* Changes to login after review

* Move login classes to their own package

* Fix linting issues
2022-03-08 21:22:19 +01:00
kyori19 ba005c769b Merge remote-tracking branch 'tuskyapp/develop' 2022-03-04 17:51:25 +09:00
Konrad Pozniak fe350ccf36
move AccountActivity and related classes to a new package (#2216)
* move AccountActivity and related classes to a new package

* fix ktlint

* fix ktlint

* fix imports
2022-01-11 19:55:17 +01:00
kyori19 2005b32dfa Merge remote-tracking branch 'tuskyapp/develop' 2021-07-03 23:59:57 +09:00
Konrad Pozniak d5e539fd64
cleanup MainActivity / last remnants of SavedToots (#2174) 2021-05-22 19:24:40 +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
kyori19 609dcf46cb Merge remote-tracking branch 'tuskyapp/develop' 2021-04-28 11:54:29 +09:00
kyori19 a746009f74 Merge remote-tracking branch 'tuskyapp/develop' 2021-03-04 15:08:48 +09:00
Konrad Pozniak 940d6d395a
Drafts v2 (#2032)
* 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
2021-01-21 18:57:09 +01:00
kyori19 171f69a35d Merge remote-tracking branch 'tuskyapp/develop' 2020-11-20 13:21:21 +09:00
kyori19 fef4b8b07f
[needs help] Support announcements (#1977)
* Implement announcements activity

* Update reactions without api access

* Add badge style

* Use emptyList() as default parameter

* Simplify newIntent

* Use List instead of Array

* Remove unneeded ConstraintLayout

* Add lineSpacingMultiplier

* Fix wording

* Apply material design's default chip style

* Dismiss announcements automatically
2020-11-18 21:12:27 +01:00
kyori19 bb5106a18d Merge remote-tracking branch 'tuskyapp/develop' into master 2020-09-06 12:52:19 +09:00
Konrad Pozniak 1d309850b0
convert EmojiPreference and EmojiCompatFont to Kotlin (#1922)
* convert EmojiPreference and EmojiCompatFont to Kotlin

* move preference related to to dedicated preference package

* update proguard-rules.pro

* reformat & add comment

* maintain disposable information in EmojiPreference instead of EmojiCompatFont
2020-09-02 12:27:51 +02:00
kyori19 48fdcc0715 Merge remote-tracking branch 'tuskyapp/develop' 2020-05-13 21:32:29 +09:00
Konrad Pozniak b280e25727
use AndroidX WorkManager instead of Evernote Android Job (#1783)
* use AndroidX WorkManager instead of Evernote Android Job

* move notification related classes to their own package

* fix missing import
2020-05-12 18:46:49 +02:00
kyori19 cc31f7af70 Merge remote-tracking branch 'tuskyapp/develop' 2020-01-17 14:14:15 +09:00
Levi Bard 9dccd06a06 Add support for uploading audio attachments (#1630)
* Add support for audio attachments.
Partially addresses #1337

* Register Tusky as a target for audio sharing

* Use icon with textColorTertiary for audio preview
2020-01-16 19:05:52 +01:00
kyori19 9efc4a4bc9 Merge remote-tracking branch 'tuskyapp/develop' 2020-01-05 01:02:28 +09:00
kyori19 61bc887af5 Merge remote-tracking branch 'tuskyapp/develop' 2019-12-27 14:46:18 +09:00
Conny Duck 97350c59fa move classes to component packages 2019-12-22 11:47:34 +01:00
Ivan Kupalov 8770fbe986 ComposeActivity refactor (#1541)
* 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
2019-12-19 19:09:40 +01:00
kyori19 fb3263b76d Merge remote-tracking branch 'tuskyapp/develop' 2019-11-19 23:42:22 +09:00
kyori19 762b2225ca Merge remote-tracking branch 'tuskyapp/develop' 2019-11-19 21:52:13 +09:00
Konrad Pozniak d9694df0c2
Bookmarks (#1560)
* add bookmarks to timelines

* add Bookmarks to main menu

* cleanup

* handle BookmarkEvent

* fix tests

* fix bookmark handling in NotificationsFragment

* add bookmark accessibility actions
2019-11-19 10:15:32 +01: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 aa48555902 Merge remote-tracking branch 'tuskyapp/master' 2019-10-03 21:09:01 +09:00
kyori19 9e4c19a47e Scheduled toot (#1004)
* 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
2019-10-02 21:28:12 +02:00
Konrad Pozniak fe304b4e83
fix videos not always keeping aspect ratio (#1508) 2019-10-01 18:24:09 +02:00
kyori19 b1624293c1 [scheduled] Scheduled toot 2019-09-05 21:29:45 +09:00
kyori19 e5f2c0c428 [access-token] Login with access token 2019-09-05 21:29:45 +09:00