Commit Graph

281 Commits

Author SHA1 Message Date
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Konrad Pozniak 79c8f59e4e
fix crash when applying new emoji font on Android 12 (#2420) 2022-04-06 19:53:28 +02:00
Konrad Pozniak f2529a8e61
Fix Timeline not loading (#2398)
* fix cached timeline

* fix network timeline

* delete unused inc / dec extensions

* fix tests and bug in network timeline

* add db migration

* remove unused import

* commit 31.json

* improve placeholder inserting logic, add comment

* fix tests

* improve tests
2022-03-28 18:39:16 +02:00
Konrad Pozniak c47804997c
Improve handling of shared media (#2388)
* support file:// uris

* support subjects on image shares

* improve code

* improve code

* improve code
2022-03-28 18:39:05 +02:00
Mélanie Chauvel 2fc3ba3cee
Replace “status” by “post” in strings name and source values (#2405) 2022-03-27 12:23:25 +02:00
Levi Bard bbd818084d
When calculating post length, count all urls as being of the reserved character count, even if they're shorter. (#2404)
Addresses #2399
2022-03-24 19:52:18 +01: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
Conny Duck 152c8b45d0 enable JavaScript in LoginWebViewActivity 2022-03-17 21:52:06 +01:00
Konrad Pozniak 0dc32774ec
handle screen rotation in LoginWebViewActivity (#2390) 2022-03-17 21:50:14 +01:00
Konrad Pozniak e05fdc6d7b
Fix status diffing and improve timeline performance (#2386)
* fix status & account diffing

* introduce TimelineAccount

* use TimelineAccount where possible

* improve tests

* improve ConversationEntity equals/hashcode

* fix mistake in ConversationEntity

* improve StatusViewData comparison

* improve tests

* fix typo in comment
2022-03-15 21:34:57 +01:00
Konrad Pozniak 15304440ef
fix "nothing here" flickering when starting Tusky (#2377) 2022-03-12 09:38:59 +01:00
kyori19 72bb34bf27
Fix some network timeline bugs (#2373)
* Fix network timeline gap loading

* Fix fullReload keeps nextKey

* Fix reload after clearing timeline

* Improve logic to handle overlapped statuses
2022-03-12 09:38:48 +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 e6c995103e Fix reload after clearing timeline 2022-03-09 16:11:34 +09:00
Konrad Pozniak 221cdb3611
move "animate custom emojis" preference next to "animate avatars" (#2376) 2022-03-08 21:40:10 +01:00
Konrad Pozniak 34b7a3c8ee
Don't hide potential timeline bugs by catching all exceptions (#2372)
* don't hide potential timeline bugs by catching all exceptions

* fix NetworkTimelineRemoteMediatorTest

* improve ifExpected function

* fix code formatting
2022-03-08 21:39:59 +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 1abe28943c Merge remote-tracking branch 'tuskyapp/develop'
# Conflicts:
#	app/src/main/res/values-fr/strings.xml
#	app/src/main/res/values-pt-rBR/strings.xml
#	app/src/main/res/values-zh-rCN/strings.xml
#	fastlane/metadata/android/pt-BR/changelogs/58.txt
#	fastlane/metadata/android/pt-BR/changelogs/61.txt
#	fastlane/metadata/android/pt-BR/changelogs/72.txt
2022-03-08 08:03:21 +09:00
kyori19 32bb7fa010 Fix fullReload keeps nextKey 2022-03-08 06:18:24 +09:00
kyori19 23ff74d2e4 Fix network timeline gap loading 2022-03-07 16:18:19 +09:00
kyori19 5986bd80b2 Fix inserted placeholder on streaming causes corruption 2022-03-07 14:26:32 +09:00
Konrad Pozniak 841373e947
fix various timeline related crashes (#2369)
* fix various timeline related crashes

* fix ktlint
2022-03-06 17:40:24 +01: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
Konrad Pozniak 73e9338f3c
fix timeline jumping to top when activity is recreated (#2364) 2022-03-03 20:01:47 +01:00
kyori19 4a8fa74f79 Merge commit '224161caf111a15887cbc8a419763e87fe69931d' 2022-03-04 00:37:23 +09:00
Konrad Pozniak 497b434663
Improve timeline dao (#2353)
* improve TimelineDao methods

* remove @Transaction from cleanup methods
2022-03-02 20:40:06 +01:00
Konrad Pozniak b145fc9d50
fix String.inc() and String.dec() not being inverse operations (#2355) 2022-03-01 21:29:05 +01:00
Levi Bard 7114575497
Instance configuration: the easy parts (#2341)
* Add data model for instance configuration

* Support instance.configuration.statuses.max_characters

* Support instance.configuration.statuses.characters_reserved_per_url

* Support instance.configuration.polls.max_options and max_characters_per_option

* Pacify ktlint

* Support instance-configured poll durations

* Fixup versions for migration after rebase
2022-03-01 19:43:36 +01:00
Konrad Pozniak 2c91b1148c
fix database migration to v29 (#2354) 2022-02-27 20:16:41 +01:00
Konrad Pozniak 2960a85ff1
use ViewData only instead of Pair<Status, ViewData> in Search (#2336) 2022-02-25 18:57:49 +01:00
Konrad Pozniak c592dfef78
Don't use notifyDataSetChanged in TimelineFragment (#2334) 2022-02-25 18:57:40 +01:00
Konrad Pozniak f7dfffa762
merge ModalTimelineActivity & ViewTagActivity into StatusListActivity (#2332)
* Rename .java to .kt

* merge ModalTimelineActivity & ViewTagActivity into StatusListActivity

* fix crash when opening hashtag
2022-02-25 18:57:31 +01:00
Konrad Pozniak eea81d7106
use POST api/v2/media to upload media (#2327) 2022-02-25 18:57:18 +01:00
Konrad Pozniak 8dbf255617
get rid of deprecated onActivityCreated in TimelineFragment (#2326) 2022-02-25 18:56:58 +01:00
Levi Bard addce87eb6
Use tags from status when adding handlers to hashtag spans in status content (#2344)
* Migrate LinkHelper to kotlin

* Support tags field on statuses

* Use embedded tags list in status instead of text scraping to embed tag click handler.
Fixes #2283

* Make mentions and tags lists nonnullable

* Make LinkHelper.openLink a Context extension method

* Use builtin extension for uri conversion

* More cleanup in LinkHelper

* Add tests for LinkHelper.getDomain

* Unbreak tags in places that don't have a tag list (e.g. profiles)

* Fixup javadoc
2022-02-25 18:56:21 +01:00
Levi Bard f822234995
Add "open as" to profiles (#2340)
* Extract "open as" utilities to BaseActivity

* Add "open as" to profiles.
Fixes #2329

* Rename STATUS_URL intent extra key

* Add nullability notations for new java code

* Pacify ktlint
2022-02-25 18:55:58 +01:00
Konrad Pozniak 69bcc92c46
fix cache cleanup deleting more statuses than it should (#2348)
* fix cache cleanup deleting more statuses than it should

* reset LOAD_AT_ONCE

* improve tests

* move cache clean code back to ViewModel
2022-02-21 19:33:10 +01:00
Mélanie Chauvel c8ed6b482e
increase default poll max option chars from 25 to 50 (#2343)
25 is old Mastodon default, the new one is 50
2022-02-18 20:08:38 +01:00
Konrad Pozniak 329df1280b
fix sensitive media in search and notifications (#2335) 2022-02-12 09:56:08 +01:00
Konrad Pozniak ae656a17a8
fix vertical insets of AccountActivity (#2320) 2022-02-09 20:45:56 +01:00
kyori19 abcb56b218 Use CacheUpdater for streaming 2022-02-08 17:01:37 +09:00
kyori19 84fff2cc6f Fix NotImplementedError on some activity 2022-02-08 16:55:24 +09:00
Konrad Pozniak d2d52da717
Fix crash in TimelineFragment (#2317) 2022-02-07 20:04:40 +01:00
Konrad Pozniak db1cc02fb8
Fix announcement reactions (#2311)
* fix size of announcement reactions

* fix announcement reactions not updating correctly

* remove unused code

* improve code

* remove unused imports
2022-02-05 19:13:05 +01:00
Konrad Pozniak 61ba6fe181
Fix disappearing placeholders (#2309)
* add getNextPlaceholderIdAfter to TimelineDao

* fix disappearing placeholders

* fix disappearing placeholders
2022-02-03 18:51:15 +01:00
Konrad Pozniak c3da6f901f
display custom emoji in announcements (#2310) 2022-02-02 21:43:16 +01:00
Konrad Pozniak ab6ea6dc89
fix placeholder not disappearing when no statuses are loaded (#2305) 2022-02-02 18:29:59 +01:00
kyori19 0e012208eb Fix streaming 2022-01-31 10:08:35 +09:00
kyori19 e78cdad22f Refactor streaming feature 2022-01-25 03:32:57 +09:00