Commit Graph

5227 Commits

Author SHA1 Message Date
Tak! e416a3e43d Remove reviewdog github action 2023-09-07 10:18:52 +02:00
Levi Bard 84969586c8
refactor domain blocks to paging (#3801)
Adds Paging, ViewModel, error snackbars, removes Rx, renames everything
to "domain blocks" to match the Masto Api

part of #2992
2023-09-06 10:11:17 +02:00
Tak! a96460cb16 Merge branch 'develop' into refactor_instancemute 2023-09-06 08:55:34 +02:00
Levi Bard b0150212c3
3891 better hashtag filtering (#3893)
Fixes #3891 (the first two observerations; the rest is either ok or has
another issue)
2023-09-05 09:35:33 +02:00
Levi Bard 5f0f4b82b9
3530: Provide a help text on the empty conversations view (#3531)
Fixes #3530
2023-09-05 09:34:50 +02:00
Levi Bard 7016fa3abc
don't crash on unexpected json responses (#3635) 2023-09-05 09:34:20 +02:00
Levi Bard 02404564e0
Detect Bookwyrm URL formats (#3936)
While helping test an issue with
[Bookwyrm](https://github.com/bookwyrm-social/bookwyrm) I noticed that
the URL formats used by that project aren't checked as possible profile
or post links. They're quite close to a couple of others, so I just
copied close examples and edited a couple of terms.

It's pretty minor, I just used a previous commit as a reference. Let me
know if it needs anything more though. I've only quickly tested it on a
local build with a couple of links against a live Bookwyrm and it picks
them up as expected now.
2023-09-05 09:33:51 +02:00
Levi Bard 710ce32a02
fix links sometimes being underlined (#3990)
closes #3989 

before:

![before](https://github.com/tuskyapp/Tusky/assets/10157047/a9004b44-dfd3-414d-838e-538df1eee2a7)

after:

![after](https://github.com/tuskyapp/Tusky/assets/10157047/f98790ac-80f1-459a-b726-b14b112fe0b1)
2023-09-05 09:33:39 +02:00
Levi Bard a6ab185790
Fix weblate conflict (#3996)
Here this should fix the weblate conflict. No idea why this happened.
This PR must not be squashed or Weblate won't find its commits (as for
all Weblate PRs).
2023-09-04 11:38:08 +02:00
Conny Duck 27a8683627 fix weblate conflict 2023-09-04 11:20:37 +02:00
mcclure 6566f89997
Fix link to Matrix in README (#3995)
Updated Matrix chat link to correct Matrix Space link.
2023-09-03 16:02:08 +01:00
Conny Duck ee4f6f4b7f fix links sometimes being underlined 2023-08-30 18:49:59 +02:00
Goooler 1e9bb3a980
Merge branch 'tuskyapp:develop' into agp811 2023-08-29 19:53:44 +08:00
Levi Bard 10a6b1616a
Editing profile: No change warning on leave. (#3972)
### Objective
* Prevent data loss when the user inadvertently hits back or wants to
leave the profile edition with unsaved changes.

### Description
* To limit the number of changes to the existing codebase, I merely
re-used the same method used by `save()` in the ViewModel to decide
whether to make a network request or simply return the profile as-is.
* ~A bit of code juggling around in the ViewModel and I was able to use
the logic for all the encoding of each profile field (Which is what the
ViewModel caches in memory).~ Thanks @Lakoja for improving this in the
VM.
* A couple of internal data classes used as helpers to move all the
fields around (now that they are no longer used in one single place)
were introduced.

### Potential Optimizations
* ~The profile encoding is done twice (once for checking, and then again
if the user has to actually save it). I'd say this is a negligible price
to pay, since the alternative would be to create a different set of
comparisons and/or keeping another profile in memory for the purpose of
comparison.~

### Visual Improvement
* I believe the Dialog is difficult to see, but it's being displayed
with Tusky's theme. Perhaps there's a better style to apply in this
case? (or maybe the edit profile activity shouldn't have the same
background color as dialogs?!)


### Issue
* #3486
2023-08-28 14:13:24 +02:00
Goooler 952e83959a Remove lint version overriding 2023-08-25 10:27:14 +08:00
Goooler 0b67be9932 Use configureEach 2023-08-25 10:22:32 +08:00
Goooler 268a689f3d Remove compileOptions 2023-08-25 10:21:47 +08:00
Goooler 6a829da010 AGP 8.1.1 2023-08-25 10:21:27 +08:00
Goooler d694f8f495 Migrate deprecated buildDir 2023-08-25 10:20:18 +08:00
Goooler 4c853a8689 Gradle 8.3 2023-08-25 10:19:40 +08:00
Mike Haynes 5764efa5d4
Allow the user to add a "bookmarks" tab (#3983)
Fixes #2368
2023-08-24 16:21:43 +02:00
Martin Marconcini 780dae00a6
Merge branch 'develop' into prompt_to_save_before_leaving_changed_profile 2023-08-24 15:14:10 +02:00
Lakoja 70d86345a8 3891: Match (only) title for muting state 2023-08-24 15:00:52 +02:00
Nik Clayton f118088161
Revert "Enable gradle build cache for Bitrise builds" (#3920)
Reverts tuskyapp/Tusky#3840. Turns out this needs to be enabled at
Bitrise, and it's not on our plan. So every build is running this extra
workflow, but it's not providing any benefit, just slowing things down.
2023-08-24 13:01:03 +02:00
Martin Marconcini b0294a8b93
Merge branch 'develop' into prompt_to_save_before_leaving_changed_profile 2023-08-24 10:06:43 +02:00
Martin Marconcini 387c3989d7
Apply PR suggestions:
* Remove dialog title and string
* Rename Data Class
* Use liveData.value directly when possible
2023-08-24 10:06:25 +02:00
Nik Clayton 0c892cf56f
Leave comments on PRs with fixes for lint errors (#3224)
Runs `ktlintFormat`, and adds comments to the PR if that generates any
diffs. The comments include the fix, which can be accepted immediately
through the GitHub UI.
2023-08-23 22:49:44 +02:00
Martin Marconcini 2d52ab9072
Merge branch 'develop' into prompt_to_save_before_leaving_changed_profile 2023-08-23 15:50:43 +02:00
Martin Marconcini a58f29fa57
Merge pull request #1 from Lakoja/3486-separate-diff-from-encode
3486 separate diff from encode
2023-08-23 15:50:26 +02:00
Lakoja 45d2fa1570 3486: (Appease linter) 2023-08-23 15:06:08 +02:00
SpaceFox 85888ac238
Uses the system theme as default theme (#3813)
Set the "System Design" as the default theme.

This ensures that the app's initial behaviour respect's the user's system-wide theme choice, while still allowing the user to adjust it later.

This is only done for new installs of Tusky. If the user is upgrading from a previous release and they did not have an explicit theme set then the dark theme is used, and the UX does not change.
2023-08-23 15:04:24 +02:00
Weblate dd0cf9c366
Translations update from Weblate (#3971)
Translations update from [Weblate](https://weblate.tusky.app) for
[Tusky/Tusky](https://weblate.tusky.app/projects/tusky/tusky/).



Current translation status:

![Weblate translation
status](https://weblate.tusky.app/widgets/tusky/-/tusky/horizontal-auto.svg)

---------

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Co-authored-by: puf <puffinux@tutanota.com>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Co-authored-by: XoseM <xosem@disroot.org>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
2023-08-22 22:23:07 +02:00
Lakoja 3a40274003 3486: Re-introduce separate check method to not need a synthetic accessor (lint error) 2023-08-22 21:17:22 +02:00
Nik Clayton f49b1cc744
Fix exception when updating summary notifications (#3976)
dc9e9f2aeb
modifed the code that fetched the value of EXTRA_NOTIFICATION_TYPE in an
intent, to use getSerializable().

However, the value was being placed in to the intent using putString().

This caused an exception when trying to update the summary notification,
so it would never update.

```
java.lang.ClassCastException: java.lang.String cannot be cast to com.keylesspalace.tusky.entity.Notification$Type
    at com.keylesspalace.tusky.components.notifications.NotificationHelper.updateSummaryNotifications(NotificationHelper.java:321)
    at com.keylesspalace.tusky.components.notifications.NotificationFetcher.fetchAndShow(NotificationFetcher.kt:87)
    at com.keylesspalace.tusky.components.notifications.NotificationFetcher$fetchAndShow$1.invokeSuspend(Unknown Source:14)
```

Fix this by placing the value in to the intent using putSerializable(),
to match how it will be fetched.
2023-08-22 18:22:45 +02:00
Lakoja ba50ff5686 3486: Separate diff and encoding 2023-08-22 16:12:03 +02:00
Lakoja f09f464667 3486: Rename stuff 2023-08-22 15:52:09 +02:00
Martin Marconcini 84915e6af5
Merge branch 'develop' into prompt_to_save_before_leaving_changed_profile 2023-08-22 13:06:27 +02:00
Martin Marconcini e56c0cb5a3
Avoid synthetic accessors. 2023-08-22 12:49:33 +02:00
Martin Marconcini 8edc8d6422
Make profileData internal so there's no synthetic accessor required. 2023-08-22 12:19:38 +02:00
Martin Marconcini c446d510e4
Fix lint double space. 2023-08-22 12:08:13 +02:00
Martin Marconcini 06239bb8a1
Fix synthetic accessor lint error. 2023-08-22 12:05:11 +02:00
Martin Marconcini 634f020ffa
Apply klint recommendations. 2023-08-19 17:57:25 +02:00
Martin Marconcini 461ec8d722
Prompt user before leaving edit profile when any field has been modified. 2023-08-19 17:36:00 +02:00
Nik Clayton 059352f471
Display notification filter/clear actions as menu items (#3877)
Previously the notification filter and clear actions were shown as
buttons in the UI, with a preference that determined whether they were
displayed.

Remove this preference, and display them as menu items.

- "Filter notifications" is shown as an icon, if possible
- "Clear notifications" is only ever shown as a menu item, to reduce the
chance the user inadvertently selects it

To ensure that the options menu appears correctly, remove the code that
creates a "fake" action bar, and adjust the layouts so that there are
three toolbars;

- mainToolbar -- displays the icons, and the current "location" (Home,
Notifications, etc)
- topNav -- displays the row of tabs at the top
- bottomNav -- displays the row of tabs at the bottom

Only one of them is set as the support action bar (depending on the
user's preferences). This provides the "show a logo" and "show the
options menu" functionality as standard, without needing to re-implement
as the previous code did.
2023-08-19 14:41:10 +02:00
Angelo Suzuki c7ffc6ad93
Hide option to mute own domain from account profile page (it is a no-op). (#3937)
Muting your own server domain is a no-op. Check for this case, and remove the "mute" menu item if true.

Fixes #3798
2023-08-19 14:17:04 +02:00
XoseM 02b0bdb266 Translated using Weblate (Galician)
Currently translated at 99.8% (618 of 619 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-08-19 11:56:38 +00:00
Hồ Nhất Duy e08582ded1 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (619 of 619 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-08-19 11:56:38 +00:00
Eric 2d9d472464 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (619 of 619 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-08-19 11:56:38 +00:00
Oliebol 25d7bfab5c Translated using Weblate (Dutch)
Currently translated at 96.9% (600 of 619 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-08-19 11:56:38 +00:00
Danial Behzadi e53a0f0644 Translated using Weblate (Persian)
Currently translated at 100.0% (619 of 619 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-08-19 11:56:38 +00:00