Commit Graph

1418 Commits

Author SHA1 Message Date
Josh Soref 98092e6ff7
Spelling (#2771)
* spelling: activity

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: animation

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: detailed

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: memory

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: opened

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: preferable

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: spoiler

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: thumbnail

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: visibility

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: whitespace

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 19:32:39 +01:00
Eva Tatarka be96aa576e
Show toast if pin fails (#2755)
* Show toast if pin fails

Fixes #2229

* Swtich to snackbar

* Show generic error message if no server error is available

* Fix pin error logging
2022-11-09 19:30:50 +01:00
Benjamin Stürmer a64dee9be0
#2072: hide add reaction when limit is reached (#2766)
* #2072: hide add reaction when limit is reached

* use extensions function for show/hide view

* fix condition :(
2022-11-07 20:10:49 +01:00
Abrar Wiryawan c0a06f7188
migrate `IOUtils` to Kotlin (#2763)
* migrate `IOUtils` to Kotlin

* Fix ktlint

* change functions inside IOUtils to extension function
2022-11-07 20:10:06 +01: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
Eva Tatarka 4bf541932a
Handle config changes for video playback (#2754)
Fixes #2419
2022-11-07 19:57:13 +01:00
Konrad Pozniak 8e9b356074
show rules on the login screen (#2746)
* show rules on the login screen

* fix code formatting

* fix code formatting

* fix tests
2022-11-05 17:37:20 +01:00
Konrad Pozniak f870445b54
Fix rendering of link preview images (#2743)
* fix link previews in timelines rendering images incorrectly

* fix ripple effect when clicking on cards

* remove unnecessary line of code
2022-11-04 19:22:53 +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
Levi Bard 58e8f75287
Don't markup urls where the display text is exactly the domain (#2732)
* Don't markup urls where the display text is exactly the domain (or www.thedomain)

* Remove unused arguments
2022-11-01 16:41:55 +01:00
Konrad Pozniak 532afaad2b
warn before deleting a scheduled post (#2721) 2022-10-28 16:46:38 +02:00
Konrad Pozniak 2481bc0523
improve check for media upload status (#2720) 2022-10-28 16:46:12 +02:00
fynngodau 050891ebe5
Retain instance state in compose activity (#2722)
* Correctly restore instance state in compose activity

Store post visiblity, schedule time, and visibility of content warning
field to instance state and restore upon restoration.

* Remove redundant line
2022-10-18 19:38:27 +02:00
mcclure 85a6b2d96b
Preference to disable multiple-login usernames (#2718)
* Preference to disable multiple-login usernames (with problems)

* Fix problem where 'show self username disambiguation' does not take effect immediately because MainActivity needed to be restarted

* Make 'show username in toolbars' a 3-option selector, default when multiple accounts logged in

* Move SHOW_SELF_USERNAME higher in preference fragment
2022-10-18 19:38:17 +02:00
Levi Bard 9dd3a3d79b
Parse html tags out of status content before applying filters. (#2713)
Fixes #2660
2022-10-14 20:03:19 +02:00
Ivan Kupalov 91d18998ac
Request status language in getStatuses() (#2710) 2022-09-26 11:06:44 +02:00
mcclure 7684f06938
Add UI for image-attachment "focus" (#2620)
* Attempt-zero implementation of a "focus" feature for image attachments. Choose "Set focus" in the attachment menu, tap once to select focus point (no visual feedback currently), tap "OK". Works in tests.

* Remove code duplication between 'update description' and 'update focus'

* Fix ktlint/bitrise failures

* Make updateMediaItem private

* When focus is set on a post attachment the preview focuses correctly. ProgressImageView now inherits from MediaPreviewImageView.

* Replace use of PointF for Focus where focus is represented, fix ktlint

* Substitute 'focus' for 'focus point' in strings

* First attempt draw focus point. Only updates on initial load. Modeled on code from RoundedCorners builtin from Glide

* Redraw focus after each tap

* Dark curtain where focus isn't (now looks like mastosoc)

* Correct ktlint for FocusDialog

* draft: switch to overlay for focus indicator

* Draw focus circle, but ImageView and FocusIndicatorView seem to share a single canvas

* Switch focus circle to path approach

* Correctly scale, save and load focuses. Clamp to visible area. Focus editor looks and feels right

* ktlint fixes and comments

* Focus indicator drawing should use device-independent pixels

* Shrink focus window when it gets unattractively tall (no linting, misbehaves on wide aspect ratio screens)

* Correct max-height behavior for screens in landscape mode

* Focus attachment result is are flipped on x axis; fix this

* Correctly thread focus through on scheduled posts, redrafted posts, and drafts (but draft focus is lost on post)

* More focus ktlint fixes

* Fix specific case where a draft is given a focus, then deleted, then posted in that order

* Fix accidental file change in focus PR

* ktLint fix

* Fix property style warnings in focus

* Fix remaining style warnings from focus PR

Co-authored-by: Conny Duck <k.pozniak@gmx.at>
2022-09-21 20:28:06 +02:00
Levi Bard 5d09a67b52
Fix the tag span generation for tags with nonascii characters (#2700)
* Update mention and tag regexes from mastodon

* Normalize nonascii tag names the same way that mastodon does
2022-09-17 19:06:45 +02:00
Levi Bard 687cffd540
Show target domains for non-mention/non-hashtag links where the target domain is not provided or differs from the domain in the text (#2698)
* Show target domains for non-mention/non-hashtag links where the target domain is not provided or differs from the domain in the text.
Addresses #2694

* Add link signifier to the marked-up domain

* Back down on validating hashtags and mentions, don't markup _any_ urls where the text starts with #/@
2022-09-17 19:06:07 +02:00
Vivianne c908ebb3f1
Add display of handle when using multiple accounts (#2697)
- Shown on the main toolbar (subtitle)
- Shown just above the "replying to" message (even if not replying)
2022-09-17 19:05:56 +02:00
Konrad Pozniak 655ce30031
migrate timeline api calls from Rx Single to suspending functions (#2690)
* migrate timeline api calls from Rx Single to suspending functions

* fix tests
2022-09-13 19:47:55 +02:00
Prat 5bc680ab78
Refactor Caption Dialog to handle screen rotation (#2626) (#2693)
Co-authored-by: Prat T <pt2121@users.noreply.github.com>
2022-09-12 18:21:00 +02:00
Konrad Pozniak c8fc2418b8
AccountMediaFragment improvements (#2684)
* initial setup

* add spacing between images

* use blurhash

* handle hidden state and show video indicator

* handle item clicks

* small cleanup

* move SquareImageView into account.media package

* fix build

* improve AccountMediaGridAdapter

* handle loadstate, errors and refreshing

* remove commented out code

* log error

* show audio attachments with icon

* fix glitchy transition animation

* set image Description on imageview

* show toast with media description on long press
2022-09-02 16:52:47 +02:00
Ivan Kupalov 257f3a5c1c
Fix broken timeline when there are only expired filters (#2689)
* Fix broken timeline when there are only expired filters

The issue happened when the only applicable filters are expired. There
was a check to not produce an empty regex when there are no filters but
it was done before removing expired filters so we would produce an
empty regex that would match (and remove) everything and the timeline
would get stuck.

* Make a mini-optimization for FilterModel
2022-08-31 18:55:27 +02:00
Konrad Pozniak 4665637086
make all model classes immutable (#2686) 2022-08-31 18:54:40 +02:00
Levi Bard 0041acf2d4
Add language dropdown to compose view (#2651)
* Add UI for selecting post language

* Apply selected language when sending status

* Save/restore post language with drafts

* Fall back to english if the configured language isn't found in the locale list (no-NB)

* Remove comment about no_NB

* Move language dropdown to top of compose view

* Preserve language when redrafting

* Set default language to target post's language when replying

* Add Tusky license header to new source file

* Tweak language dropdown button width
2022-08-31 18:53:57 +02:00
Ivan Kupalov c638ad7e6b
Make CaptionDialog non-cancellable, fix #2626 (#2676)
This prevents accidental closing of dialog by clicking
outside of the dialog.
2022-08-22 16:18:45 +02:00
Konrad Pozniak f094f84b86
fix ConversationLineItemDecoration (#2677)
* fix ConversationLineItemDecoration

* cleanup code a bit
2022-08-22 15:17:08 +02:00
Levi Bard c47d9ef6ac
Support setting filter expirations (#2667)
* Show filter expiration in list

* Add support for setting and updating the duration of a filter

* Add tests for duration conversion math

* Refactor network wrapper code

* Mark updated mastodon api functions as suspend

* Avoid creating unnecessary Date objects

* Apply suggestions to filter dialog layout
2022-08-17 17:50:34 +02:00
Konrad Pozniak 7a53bce439
improve sending error notifications (#2671)
* improve sending error notifications

* rename draftNotification -> buildDraftNotification
2022-08-16 20:08:03 +02:00
Konrad Pozniak edbc624625
fix saving multiple attachments as draft (#2670) 2022-08-16 20:07:49 +02:00
Levi Bard b21def5041
Respect filter expiration date when applying filters (#2661)
* Respect filter expiration date when applying filters. #2578

* Fix typing for filter `expires_in` api points
2022-08-15 11:01:04 +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 1fed84f948
fix caching of instance defaults and emojis (#2643)
* fix caching of instance defaults and emojis

* use correct OnConflictStrategy

* rename dao methods
2022-08-07 22:18:53 +02:00
Konrad Pozniak 4f0f9a7a12
update Kotlin to 1.7.10 and fix some (new?) warnings (#2647)
* update Kotlin to 1.7.10 and fix some (new?) warnings

* remove unused import
2022-08-07 19:36:09 +02:00
Konrad Pozniak 17cfa3d9b4
support Pleroma upload_limit configuration (#2646)
* support Pleroma upload_limit configuration

* fix ComposeActivityTest
2022-08-07 19:14:42 +02:00
Konrad Pozniak 68c9870b19
update AndroidX dependencies (#2641)
* update AndroidX dependencies

* fix ComposeActivityTest
2022-08-07 19:13:59 +02:00
Levi Bard 042176e523
Add support for following hashtags (#2642)
* Add support for following hashtags. Addresses #2637

* Update rxjava to coroutines

* Update new tag api to use suspend functions

* Update hashtag unfollow icon

* Set correct tint on hashtag follow/unfollow icons

* Translate hashtag follow/unfollow error messages

* Toast => Snackbar

* Remove unnecessary view lookup
2022-08-07 19:09:26 +02:00
QuirkyPony 17fb93626c
adapt file size error messages to show real instance upload limit (#2630)
* remove megabyte counts from file size error messages

The file size limits depend on the server; change strings to reflect that.

* show real file size limits instead of assuming Mastodon defaults

* correct previous commit

* correct previous commit (again)

* remove megabyte counts from file size error messages

The file size limits depend on the server; change strings to reflect that.

* Translated using Weblate (Galician)

Currently translated at 100.0% (489 of 489 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky

* Translated using Weblate (Finnish)

Currently translated at 5.5% (1 of 18 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/fi/

* correct previous commit

correct previous commit (again)

fixed type error caused by previous commits

* fix lint error...

* Update strings.xml

* improve code, calculate correct max size and format it

Co-authored-by: Laura <the-ceo-of-antifa@protonmail.com>
Co-authored-by: XoseM <xosem@disroot.org>
Co-authored-by: Konrad Pozniak <k.pozniak@gmx.at>
2022-08-05 18:55:13 +02:00
Konrad Pozniak 55796c9a30
update minSdkVersion to 23 (#2638)
closes #2606
2022-08-04 16:48:26 +02:00
Konrad Pozniak 2d2d7569e3
fix compose field focus when replying to post with cw (#2634) 2022-08-03 17:23:54 +02:00
Martin Marconcini 8b026991e0
2616: Save Scheduled Time for Drafts. (#2624)
* 2616: Save Scheduled Time for Drafts.

Signed-off-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>

* Revert 39.json schema to the original state before my changes.
2022-07-27 21:06:51 +02:00
Konrad Pozniak 1b6a0908f6
Handle even more instance defaults (#2612)
* handle media size instance limits

* remove unused attributes from Instance entity

* support max_media_attachments

* support pleroma field limits, remove max_bio_chars support

* improve field input margin

* fix tests

* MAX_ACCOUNT_FIELDS -> DEFAULT_MAX_ACCOUNT_FIELDS

* improve "add field" button behavior

* fix copy paste mistake in AccountFieldEditAdapter

* refactor sendStatus to be a suspending function
2022-07-26 20:24:50 +02:00
Konrad Pozniak 526f170d51
don't crash on invalid json response for push subscription (#2613) 2022-07-11 18:17:58 +02:00
Konrad Pozniak a8a97b6834
fix relogin bug (#2609)
* fix relogin bug

* fix ktlint
2022-07-05 18:18:12 +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
Konrad Pozniak 62c4cfde89
improve media upload error messages (#2602) 2022-06-30 20:51:05 +02:00
Konrad Pozniak 8a0848d252
fix data loss when re-adding existing account (#2601) 2022-06-30 20:49:48 +02:00
Konrad Pozniak 9dcb1b666c
show push migration snackbar above floating action button (#2598) 2022-06-30 20:49:27 +02:00
Levi Bard 8551785389
Fix hiding/showing preview cards for sensitive statuses (#2600)
* Update comment on StatusViewData.isCollapsible

* Fix hiding/showing preview cards for sensitive statuses.
Fixes #2565

* Fix typo
2022-06-24 21:47:49 +02:00