Commit Graph

4757 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Nik Clayton b6102a755a
Rename "Trending" to "TrendingTags" or similar where necessary (#3906)
The "trending" functionality will expand to include trending links and
posts. But at the moment the "Trending" references in the code are
exclusively to hashtags.

Rename "Trending" to "TrendingTags" or similar everywhere necessary in
order to prepare for this.

This includes a database migration, as the identifier for the "Trending
tags" tab in the account preferences was changed from "Trending" to
"TrendingTags". The migration updates the stored value if necessary.
2023-08-19 12:54:35 +02:00
Konrad Pozniak dc9e9f2aeb
Improve account switching intents (#3732)
Before, intent creation was scattered across multiple sites, with account switching logic in both `ComposeActivity` and `MainActivity`.

Now, intents are only created in `MainActivity` Companion, and account switching only occurs in `MainActivity`

Fixes #3695
2023-08-19 12:31:47 +02:00
Martin Marconcini 85f0b1f320
Prompt the user before deleting a filter
Prevent users from accidentally deleting filters by prompting them to confirm.

Add an AlertDialog extension that converts AlertDialog callbacks to linear control flow.

Fixes #3736.
2023-08-17 22:26:46 +02:00
puf 22b7afb62d Translated using Weblate (Welsh)
Currently translated at 100.0% (617 of 617 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-17 17:12:22 +02:00
Ümit Solmaz 64264ead68 Translated using Weblate (Turkish)
Currently translated at 100.0% (617 of 617 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-08-14 12:00:59 +02:00
Hồ Nhất Duy 2e25431f40 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (617 of 617 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (617 of 617 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-14 12:00:59 +02:00
Nik Clayton 58521b3370
Remove unnecessary log message in CompositeWithOpaqueBackground (#3955) 2023-08-14 12:00:21 +02:00
Hồ Nhất Duy 1275a35ebf Translated using Weblate (Vietnamese)
Currently translated at 100.0% (617 of 617 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-13 23:35:59 +02:00
S. Lee 452e305464 Translated using Weblate (Korean)
Currently translated at 57.0% (352 of 617 strings)

Co-authored-by: S. Lee <ssharp0614@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ko/
Translation: Tusky/Tusky
2023-08-13 23:35:59 +02:00
Eric 4cc97b1c5d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (617 of 617 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-08-13 23:35:59 +02:00
Oliebol bd141983f2 Translated using Weblate (Dutch)
Currently translated at 96.9% (598 of 617 strings)

Co-authored-by: Oliebol <schrijfmedan@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/nl/
Translation: Tusky/Tusky
2023-08-13 23:35:59 +02:00
Danial Behzadi 0592de0530 Translated using Weblate (Persian)
Currently translated at 100.0% (617 of 617 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-13 23:35:59 +02:00
puf 63848291b6 Translated using Weblate (Welsh)
Currently translated at 100.0% (617 of 617 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-13 23:35:59 +02:00
renovate[bot] 13399d8737
Update dependency org.mockito.kotlin:mockito-kotlin to v5.1.0 (#3947)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[org.mockito.kotlin:mockito-kotlin](https://togithub.com/mockito/mockito-kotlin)
| `5.0.0` -> `5.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.mockito.kotlin:mockito-kotlin/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.mockito.kotlin:mockito-kotlin/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.mockito.kotlin:mockito-kotlin/5.0.0/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.mockito.kotlin:mockito-kotlin/5.0.0/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mockito/mockito-kotlin
(org.mockito.kotlin:mockito-kotlin)</summary>

###
[`v5.1.0`](https://togithub.com/mockito/mockito-kotlin/releases/tag/5.1.0)

[Compare
Source](https://togithub.com/mockito/mockito-kotlin/compare/5.0.0...5.1.0)

<sup><sup>*Changelog generated by [Shipkit Changelog Gradle
Plugin](https://togithub.com/shipkit/shipkit-changelog)*</sup></sup>

##### 5.1.0

- 2023-08-09 - [3
commit(s)](https://togithub.com/mockito/mockito-kotlin/compare/5.0.0...5.1.0)
by Hunter Werlla, Lukáš Křečan, Tim van der Lippe
- Also run release job on 5.x tags
[(#&#8203;491)](https://togithub.com/mockito/mockito-kotlin/pull/491)
- [#&#8203;474](https://togithub.com/mockito/mockito-kotlin/issues/474)
Fix vararg argument matcher
[(#&#8203;490)](https://togithub.com/mockito/mockito-kotlin/pull/490)
- Fix issue
[#&#8203;480](https://togithub.com/mockito/mockito-kotlin/issues/480) by
widening the allowed types for lenient().whenever()
[(#&#8203;485)](https://togithub.com/mockito/mockito-kotlin/pull/485)
- lenient().whenever() reports type mismatch TypeVariable(T) was
expected
[(#&#8203;480)](https://togithub.com/mockito/mockito-kotlin/issues/480)
- Mockito 5.0 breaks vararg argument capture in Kotlin
[(#&#8203;474)](https://togithub.com/mockito/mockito-kotlin/issues/474)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-13 23:35:19 +02:00
Nik Clayton 8529f309ff
Migrate to androidx-media3 video player (#3857)
Behaviour is consistent with previous player except that:

- Swapping apps while a video is playing, and then returning to Tusky,
will keep the seek position in the video instead of returning to the
start
- The controls/media description can be shown by tapping anywhere, not
just on the video itself
- The media description is on-screen for the same duration as the player
controls (5 seconds here, 3 seconds in the previous code)
- The user has options to control the playback speed
- Rotating the device does not squash/stretch the video
- Show the media preview when playing audio-only files

Fixes https://github.com/tuskyapp/Tusky/issues/3329,
https://github.com/tuskyapp/Tusky/issues/3141,
https://github.com/tuskyapp/Tusky/issues/3126,
https://github.com/tuskyapp/Tusky/issues/2753,
https://github.com/tuskyapp/Tusky/issues/3508,
https://github.com/tuskyapp/Tusky/issues/3291

---------

Co-authored-by: mcc <andi.m.mcclure@gmail.com>
2023-08-10 19:31:55 +02:00
Nik Clayton 09d4f62004
Start/end the thread divider in the middle of the avatar (#3892)
Previously, the thread indicator would start at the top of the avatar
for the status at the start of the thread, and end at the top of the
avatar for the status at the end of the thread.

If these avatars were partially transparent the thread indicator could
either (a) poke out of the top of the avatar at the start of the thread,
(b) not properly connect with the avatar at the end of the thread, or
(c) both.

Partially fix this by making the divider start/stop in the middle of the
avatar. This assumes that this area will typically have opaque content,
even if some of the rest of the avatar is transparent. This is not
always true, but it's still better than the current behaviour.
2023-08-10 19:25:33 +02:00
puf f5c7054b8c Translated using Weblate (Welsh)
Currently translated at 100.0% (31 of 31 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/cy/
2023-08-10 15:35:35 +02:00
GunChleoc b79adf3ba6 Translated using Weblate (Gaelic)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-08-10 15:05:22 +02:00
Ihor Hordiichuk e719c38599 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
2023-08-10 15:05:22 +02:00
puf a261450eb2 Translated using Weblate (Welsh)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-10 15:05:22 +02:00
Nik Clayton 4169dc34c0
Composite semi-transparent avatars over a solid background (#3874)
Avatars that are semi-transparent are a problem when viewing a thread,
as the line that connects different statuses in the same thread is drawn
underneath the avatar and is visible.

Fix this with a CompositeWithOpaqueBackground Glide transformation that:

1. Extracts the alpha channel from the avatar image
2. Converts the alpha to a 1bpp mask
3. Draws that mask on a new bitmap, with the appropriate background
colour
4. Draws the original bitmap on top of that

So any partially transparent areas of the original image are drawn over
a solid background colour, so anything drawn under them will not appear.
2023-08-08 23:09:59 +02:00
Angelo Suzuki bc310ca3fb
Add background to sensitive media button (#3939)
Using the same background and margin as the ALT button.

Fixes #3772
2023-08-08 23:08:35 +02:00
Nik Clayton 41951c906c
Provide specific gradle properties for builds on CI (#3924)
Expectation is that these will result in faster builds by disabling
options (like the gradle daemon) that benefit long-lived processes but
do not benefit ephemeral build workers.
2023-08-08 23:04:29 +02:00
Hồ Nhất Duy 1f3904b139 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (616 of 616 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-08 17:33:39 +02:00
Ümit Solmaz 58738c48f0 Translated using Weblate (Turkish)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
2023-08-08 17:33:39 +02:00
Danial Behzadi d47f646fc2 Translated using Weblate (Persian)
Currently translated at 100.0% (616 of 616 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-08 17:33:39 +02:00
Deleted User 196b0949bd Translated using Weblate (German)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: Deleted User <noreply+295@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-08-08 17:33:39 +02:00
puf 55af7fc364 Translated using Weblate (Welsh)
Currently translated at 100.0% (616 of 616 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-08-08 17:33:39 +02:00
renovate[bot] 468de28ac6
Update plugin ktlint to v11.5.1 (#3941)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| org.jlleitschuh.gradle.ktlint | `11.5.0` -> `11.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jlleitschuh.gradle.ktlint/11.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jlleitschuh.gradle.ktlint/11.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jlleitschuh.gradle.ktlint/11.5.0/11.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jlleitschuh.gradle.ktlint/11.5.0/11.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 01:56:00 +02:00
Angelo Suzuki b88f1d810b
Make CW description selectable (#3926)
While the status text in the detailed layout was selectable, CW
description wasn't.

Fixes #3826.
2023-08-07 20:32:17 +02:00
Nik Clayton 791092ef13
Fix extra clicks on media tab (#3930)
If:

1. You're viewing an account's media tab
2. Some of the media was marked sensitivei
3. The `alwaysShowSensitiveMedia` setting was `true`

tapping on the image (once) would do nothing visible, because it was
treated as the "reveal sensitive media" tap. You had to tap on it a
second time to open it.

Fix this, by passing the preference value through to the relevant code.

---------

Co-authored-by: Tiga! <maxiinne@proton.me>
2023-08-07 19:30:56 +02:00
Nik Clayton 498c7646b0
Add `newLintBaseline` task (#3925)
Add a task to regenerate the lint baseline.
2023-08-07 19:30:21 +02:00
Nik Clayton 5d4c14aed9
Correct the calculations for choosing the earliest day to show in the calendar / selected day (#3923)
To determine the earliest day to show in the calendar, take the current
date/time, add the minimum scheduled seconds buffer (which may roll the
date/time over to the next day), and then clamp to the start of that
day. So it's either today (if the current time + minimum scheduled
seconds is less than midnight) or it's tomorrow.

When displaying the calendar work around a misfeature in Material Date
Picker. It accepts UTC seconds-since-epoch, but does not convert it to
the local time for display.

While I'm here, show the selected day in the time picker's title.

Fixes https://github.com/tuskyapp/Tusky/issues/3916
2023-08-07 19:30:08 +02:00
Nik Clayton 846289b8cc
Add support for setting a list's "exclusivity" option (#3932)
Fixes #3831
2023-08-06 20:29:34 +02:00
Mike Barnes 6766509977
Use case-insensitive checks when comparing account URLs in search (#3931)
Fixes #3929
2023-08-06 13:45:48 +02:00
Angelo Suzuki a84d7f56a0
Filters> Tabs: use checkbox instead of switch (#3927)
Nowhere else in the preferences are checkboxes used.

Also removed the now unused extension function.

Fixes #3535
2023-08-06 11:50:11 +02:00