From a22b9be0cfd02f7cc246fe3803515a3e9d648ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=E1=BB=93=20Nh=E1=BA=A5t=20Duy?= Date: Sun, 27 Oct 2024 04:07:12 +0000 Subject: [PATCH 01/15] Translated using Weblate (Vietnamese) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (652 of 652 strings) Co-authored-by: Hồ Nhất Duy Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/ Translation: Tusky/Tusky --- app/src/main/res/values-vi/strings.xml | 70 +++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 363c10de4..c45ba6934 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -192,27 +192,27 @@ Liên hợp Máy chủ Thông báo - Trang chính + Trang chủ Những tút nháp Những tút đã thích Máy chủ là gì\? Hiện xem trước hình ảnh - Hiện những trả lời - Hiện lượt đăng lại + Hiện những tút dạng trả lời + Hiện những lượt đăng lại Trang chủ Lọc bảng tin - Phủ màu media nhạy cảm + Làm mờ media nhạy cảm Ảnh đại diện GIF Icon cho tài khoản Bot Ngôn ngữ Mở luôn trong app Trình duyệt - Mặc định của thiết bị + Giống thiết bị Tự động khi trời tối Đen Sáng Tối - Bộ lọc + Những từ khóa đã lọc Bảng tin Chủ đề Giao diện @@ -254,9 +254,9 @@ Trên màn hình Vị trí menu Không thể lưu thiết lập - Đăng mặc định - Tài khoản nhạy cảm (đồng bộ máy chủ) - Kiểu tút mặc định (đồng bộ máy chủ) + Mặc định khi đăng + Media nhạy cảm (đ.bộ máy chủ) + Kiểu tút (đ.bộ máy chủ) Máy chủ proxy Cổng Bật proxy @@ -268,7 +268,7 @@ Báo lỗi và đề xuất tính năng \nhttps://github.com/tuskyapp/Tusky/issues Website dự án: https://tusky.app - Tusky là phần mềm mã nguồn mở, được phân phối với giấy phép GNU General Public License Version 3. Bạn có thể tham khảo thêm tại: https://www.gnu.org/licenses/gpl-3.0.en.html + Tusky là phần mềm mã nguồn mở, được phân phối với giấy phép GNU General Public License Version 3. Tham khảo thêm tại: https://www.gnu.org/licenses/gpl-3.0.en.html Powered by Tusky Tusky %1$s Tài khoản bị khóa @@ -379,8 +379,8 @@ %1$s, %2$s và %3$d người nữa %1$s và %2$s %1$s - Lượt thích tút này - Lượt đăng lại tút này + Thích bởi + Đăng lại bởi %1$s Đăng lại @@ -398,7 +398,7 @@ CC-BY-SA 4.0 CC-BY 4.0 Giấy phép Apache (xem bên dưới) - Tusky có sử dụng mã nguồn từ những dự án mã nguồn mở sau: + Tusky có sử dụng những dự án mã nguồn mở sau: Hủy đăng lại Đăng lại công khai %1$s đã chuyển sang: @@ -416,7 +416,7 @@ Mở rộng/Thu gọn toàn bộ tút Đang tra cứu… Bạn cần tải về bộ emoji này trước - Mặc định của thiết bị + Giống thiết bị Emoji Soạn Lưu nháp\? @@ -443,7 +443,7 @@ Ẩn thông báo Bỏ ẩn %1$s Bỏ ẩn %1$s - Ẩn tiêu đề tab + Ẩn tên tab Đã lưu! Ghi chú về người này Chưa có thông báo. @@ -552,7 +552,7 @@ Những hashtag theo dõi Sửa %1$s Đã sửa - Ngôn ngữ đăng (đồng bộ máy chủ) + Ngôn ngữ đăng (đ.bộ máy chủ) %1$s (%2$s) Lỗi khi ẩn #%1$s Lỗi khi bỏ ẩn #%1$s @@ -568,9 +568,9 @@ Đăng %1$s Những lượt sửa tút Đang tải thảo luận - Chia sẻ URL người dùng + Liên kết trang hồ sơ Chia sẻ URL người dùng… - Chia sẻ tên người này + Địa chỉ Mastodon Chia sẻ tên người này… Đã sao chép tên người này Thứ tự đọc @@ -612,12 +612,12 @@ Đã từ chối yêu cầu theo dõi Vẫn hiện Đã lọc: %1$s - Người + Trang hồ sơ Bộ lọc của tôi Tên bộ lọc - Cảnh báo - Đã ẩn - Ẩn với cảnh báo + Cảnh báo ở + Lọc ở + Ẩn kèm theo cảnh báo Ẩn hoàn toàn Hành động Nơi áp dụng @@ -627,7 +627,7 @@ Thêm từ Sửa từ %1$s: %2$s - Hiện số tương tác trên tút + Hiện số tương tác tút Đây là bảng tin của bạn. Nó sẽ hiện tút gần đây từ những người bạn theo dõi. \n \nĐể khám phá mọi người, bạn có thể xem qua ở các bảng tin khác. Ví dụ: [iconics gmd_group] Bảng tin máy chủ của bạn. Hoặc bạn cũng có thể [iconics gmd_search] tìm theo tên người dùng; ví dụ như Tusky. @@ -649,7 +649,7 @@ \nSDK %4$d Tài khoản của bạn \@%1$s@%2$s -\nPhiên bản: %3$s +\nPhiên bản máy chủ: %3$s Sao chép phiên bản và thông tin thiết bị Đã sao chép phiên bản và thông tin thiết bị Thiết bị của bạn @@ -663,11 +663,11 @@ \nTin nhắn riêng được tạo bằng cách chọn tùy chọn kiểu tút [iconics gmd_public] thành [iconics gmd_mail] Nhắn riêng và có nhắc đến một người nào đó. \n \nVí dụ: bạn có thể xem hồ sơ của một người và nhấn vào nút [iconics gmd_edit] và đổi kiểu tút. - Đây là danh sách. Bạn có thể tạo nhiều danh sách riêng và thêm người dùng vào đó. -\n -\nBạn chỉ có thể thêm những người MÀ BẠN THEO DÕI vào danh sách. -\n -\nDanh sách có thể được sử dụng như một tab trong thiết lập Cá nhân [iconics gmd_account_circle] [iconics gmd_navigate_next] Xếp tab. + Đây là danh sách. Bạn có thể tạo nhiều danh sách riêng và thêm người dùng vào đó. +\n +\nBạn chỉ có thể thêm những người BẠN ĐANG THEO DÕI vào danh sách. +\n +\nDanh sách có thể được sử dụng như một tab trong thiết lập Cá nhân [iconics gmd_account_circle] [iconics gmd_navigate_next] Xếp tab. \u0020 Đang ẩn hashtag #%1$s như một cảnh báo Đang bỏ ẩn hashtag #%1$s Xem bộ lọc @@ -676,15 +676,15 @@ Không thể ẩn %1$s: %2$s Không thể bỏ ẩn %1$s: %2$s Hình ảnh - Mặc định của thiết bị (Đen) + Giống thiết bị (Đen) Tút xu hướng Không ai Người trong danh sách Người đã theo dõi Hiện lượt trả lời - Hiện lượt tự đăng lại + Hiện những lượt tự đăng lại Ai đó đăng lại tút của chính họ - Thiết lập từng bảng tin + Lọc bảng tin Hiện bộ lọc thông báo Đang gửi… Câu trả lời của bạn đã được gửi đi. @@ -699,12 +699,12 @@ Hỏi trước khi theo dõi Đã sao chép liên kết Đã sao chép \'#%1$s\' - Kiểu trả lời (không đồng bộ máy chủ) + Kiểu trả lời (không đ.bộ máy chủ) Xóa bộ lọc \'%1$s\' không được Chưa thể lưu bộ lọc \'%1$s\' Theo dõi một hashtag mới - Chọn dựa vào tút bạn đang trả lời. - Khớp mặc định tút + Tự động giống tút bạn đang trả lời + Giống mặc định tút Nhắn riêng Hết hạn sau \ No newline at end of file From 0bf1e106c698d8ac638ef7de57f5352e6c05a155 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 07:14:16 +0100 Subject: [PATCH 02/15] chore(deps): update plugin google-ksp to v2.0.21-1.0.26 (#4735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.devtools.ksp](https://goo.gle/ksp) ([source](https://redirect.github.com/google/ksp)) | `2.0.21-1.0.25` -> `2.0.21-1.0.26` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.devtools.ksp/2.0.21-1.0.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.devtools.ksp/2.0.21-1.0.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.devtools.ksp/2.0.21-1.0.25/2.0.21-1.0.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.devtools.ksp/2.0.21-1.0.25/2.0.21-1.0.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/ksp (com.google.devtools.ksp) ### [`v2.0.21-1.0.26`](https://redirect.github.com/google/ksp/releases/tag/2.0.21-1.0.26) [Compare Source](https://redirect.github.com/google/ksp/compare/2.0.21-1.0.25...2.0.21-1.0.26) #### Bugs Fixed - A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction [#​1968](https://redirect.github.com/google/ksp/issues/1968) - \[KSP2] default value is null for nested annotation [#​2077](https://redirect.github.com/google/ksp/issues/2077) - \[KSP2] "internal" members are out of order in Resolver.getDeclarationsInSourceOrder() [#​1827](https://redirect.github.com/google/ksp/issues/1827) - \[KSP2] Resolver.getDeclarationsFromPackage() couldn't find Java declarations [#​1952](https://redirect.github.com/google/ksp/issues/1952) - \[KSP2] Property setter parameter name becomes value [#​1865](https://redirect.github.com/google/ksp/issues/1865) - \[KSP2] A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction [#​1941](https://redirect.github.com/google/ksp/issues/1941) - \[KSP2] NullPointerException when calling hasBackingField on properties of Enum declarations [#​1753](https://redirect.github.com/google/ksp/issues/1753) - JVM Module name is changed for libraries [#​2105](https://redirect.github.com/google/ksp/issues/2105) - \[KSP2] asMemberOf() is not working with Java sources [#​2051](https://redirect.github.com/google/ksp/issues/2051) - KSP2: implement KSPropertyDeclaration.findOverridee and Resolver.asMemberOf for java fields [#​1642](https://redirect.github.com/google/ksp/issues/1642) - \[KSP2] command line doesn't support absolute Windows paths [#​2046](https://redirect.github.com/google/ksp/issues/2046) - \[KSP2] NPE when getting annotation arguments on non-Jvm targets [#​1823](https://redirect.github.com/google/ksp/issues/1823) - \[KSP2] Resolver.mapToJvmSignature() is not consistent [#​2109](https://redirect.github.com/google/ksp/issues/2109) - \[KSP2] Default annotation argument values are sometimes missing [#​2107](https://redirect.github.com/google/ksp/issues/2107) - \[KSP2] KSFunctionDeclaration.asMemberOf doesn't work sometimes [#​2116](https://redirect.github.com/google/ksp/issues/2116) - \[KSP2] Qualified names of nested annotations from JAVA_LIB is null [#​2033](https://redirect.github.com/google/ksp/issues/2033) - \[KSP2] Class literal annotation default values resolve to error types [#​1910](https://redirect.github.com/google/ksp/issues/1910) - KaFirPsiJavaTypeParameterSymbol cannot be cast to KaFirTypeParameterSymbol [#​2119](https://redirect.github.com/google/ksp/issues/2119) - KSP memory leak in Android build [#​2073](https://redirect.github.com/google/ksp/issues/2073) - \[KSP2] KSClassDeclaration.asType(emptyList()) fails after Resolver.getSymbolsWithAnnotation() call [#​2094](https://redirect.github.com/google/ksp/issues/2094) - KSValueArgumentImpl doesn't implement .equals() in KSP2 [#​2091](https://redirect.github.com/google/ksp/issues/2091) - \[KSP2] JvmName is ignored in annotation property getters [#​2148](https://redirect.github.com/google/ksp/issues/2148) - \[KSP2] Unable to get visibility of KSTypeAlias [#​2140](https://redirect.github.com/google/ksp/issues/2140) - Gradle kspKotlin task failed when upgrading to 2.0.20-1.0.25 [#​2123](https://redirect.github.com/google/ksp/issues/2123) - \[KSP2] Generic type arguments on typealiases are improperly forwarded to the KSType [#​2088](https://redirect.github.com/google/ksp/issues/2088) - java.lang.IllegalStateException: Storage for \[...] is already registered with 2.0.20-1.0.24 [#​2072](https://redirect.github.com/google/ksp/issues/2072) **Full Changelog**: https://github.com/google/ksp/compare/911690b86b60a0299af0e86b6abcf18d8abb003b...2.0.21-1.0.26 #### Contributors Thanks to [@​ansman](https://redirect.github.com/ansman), [@​asapha](https://redirect.github.com/asapha), [@​kaeawc](https://redirect.github.com/kaeawc), [@​kuanyingchou](https://redirect.github.com/kuanyingchou), [@​scott-pollom](https://redirect.github.com/scott-pollom), and everyone who reported bugs and participated in discussions!
--- ### 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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 45 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8b93e18dc..7926ae78c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -56,7 +56,7 @@ xmlwriter = "1.0.4" [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -google-ksp = "com.google.devtools.ksp:2.0.21-1.0.25" +google-ksp = "com.google.devtools.ksp:2.0.21-1.0.26" hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 9a3363d40..796ba2359 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -7221,6 +7221,11 @@ + + + + + @@ -7277,6 +7282,14 @@ + + + + + + + + @@ -7359,6 +7372,14 @@ + + + + + + + + @@ -7415,6 +7436,14 @@ + + + + + + + + @@ -7471,6 +7500,14 @@ + + + + + + + + @@ -7527,6 +7564,14 @@ + + + + + + + + From 09e3f4940fed40147f5c7ccd87eb29a7438a59b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 07:14:31 +0100 Subject: [PATCH 03/15] fix(deps): update dependency androidx.activity:activity to v1.9.3 (#4730) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity#1.9.3) ([source](https://cs.android.com/androidx/platform/frameworks/support)) | `1.9.2` -> `1.9.3` | [![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.activity:activity/1.9.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.activity:activity/1.9.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.activity:activity/1.9.2/1.9.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.activity:activity/1.9.2/1.9.3?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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7926ae78c..2cef39930 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] agp = "8.7.0" -androidx-activity = "1.9.2" +androidx-activity = "1.9.3" androidx-appcompat = "1.7.0" androidx-browser = "1.8.0" androidx-cardview = "1.0.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 796ba2359..83a61e151 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -38,6 +38,14 @@ + + + + + + + + @@ -67,6 +75,14 @@ + + + + + + + + From a488abd5ceb65c781d7585b611ccb4fe9d054ed6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 07:14:44 +0100 Subject: [PATCH 04/15] fix(deps): update dependency app.cash.turbine:turbine to v1.2.0 (#4728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [app.cash.turbine:turbine](https://redirect.github.com/cashapp/turbine) | `1.1.0` -> `1.2.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/app.cash.turbine:turbine/1.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/app.cash.turbine:turbine/1.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/app.cash.turbine:turbine/1.1.0/1.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/app.cash.turbine:turbine/1.1.0/1.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
cashapp/turbine (app.cash.turbine:turbine) ### [`v1.2.0`](https://redirect.github.com/cashapp/turbine/blob/HEAD/CHANGELOG.md#120---2024-10-16) [Compare Source](https://redirect.github.com/cashapp/turbine/compare/1.1.0...1.2.0) [1.2.0]: https://redirect.github.com/cashapp/turbine/releases/tag/1.2.0 ##### Added - Add `wasmWasi` target.
--- ### 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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2cef39930..3eaaa4225 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -50,7 +50,7 @@ robolectric = "4.13" sparkbutton = "4.2.0" touchimageview = "3.6" truth = "1.4.4" -turbine = "1.1.0" +turbine = "1.2.0" unified-push = "2.4.0" xmlwriter = "1.0.4" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 83a61e151..1acf829e5 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -2740,6 +2740,14 @@
+ + + + + + + + @@ -2751,6 +2759,14 @@ + + + + + + + + From 8256a1e441a09e49438d3df4e1fcab77b750404f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 08:18:46 +0100 Subject: [PATCH 05/15] chore(deps): update dependency com.android.application to v8.7.1 (#4726) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.android.application](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.7.0` -> `8.7.1` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application/8.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.application/8.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.application/8.7.0/8.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application/8.7.0/8.7.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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Conny Duck --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 523 +++++++++++++++++++++++++++++++ 2 files changed, 524 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3eaaa4225..d4caa12f6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.7.0" +agp = "8.7.1" androidx-activity = "1.9.3" androidx-appcompat = "1.7.0" androidx-browser = "1.8.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 1acf829e5..ca21a55ed 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -522,6 +522,14 @@ + + + + + + + + @@ -586,6 +594,14 @@ + + + + + + + + @@ -650,6 +666,14 @@ + + + + + + + + @@ -2887,6 +2911,14 @@ + + + + + + + + @@ -2951,6 +2983,14 @@ + + + + + + + + @@ -2991,6 +3031,11 @@ + + + + + @@ -3055,6 +3100,14 @@ + + + + + + + + @@ -3119,6 +3172,14 @@ + + + + + + + + @@ -3183,6 +3244,14 @@ + + + + + + + + @@ -3247,6 +3316,14 @@ + + + + + + + + @@ -3311,6 +3388,14 @@ + + + + + + + + @@ -3375,6 +3460,14 @@ + + + + + + + + @@ -3439,6 +3532,14 @@ + + + + + + + + @@ -3503,6 +3604,14 @@ + + + + + + + + @@ -3567,6 +3676,14 @@ + + + + + + + + @@ -3631,6 +3748,14 @@ + + + + + + + + @@ -3695,6 +3820,14 @@ + + + + + + + + @@ -3759,6 +3892,14 @@ + + + + + + + + @@ -3871,6 +4012,20 @@ + + + + + + + + + + + + + + @@ -3935,6 +4090,14 @@ + + + + + + + + @@ -3999,6 +4162,14 @@ + + + + + + + + @@ -4063,6 +4234,14 @@ + + + + + + + + @@ -4127,6 +4306,14 @@ + + + + + + + + @@ -4191,6 +4378,14 @@ + + + + + + + + @@ -4255,6 +4450,14 @@ + + + + + + + + @@ -4319,6 +4522,14 @@ + + + + + + + + @@ -4407,6 +4618,14 @@ + + + + + + + + @@ -4471,6 +4690,14 @@ + + + + + + + + @@ -4535,6 +4762,14 @@ + + + + + + + + @@ -4599,6 +4834,14 @@ + + + + + + + + @@ -4687,6 +4930,14 @@ + + + + + + + + @@ -4751,6 +5002,14 @@ + + + + + + + + @@ -4815,6 +5074,14 @@ + + + + + + + + @@ -4879,6 +5146,14 @@ + + + + + + + + @@ -4943,6 +5218,14 @@ + + + + + + + + @@ -5007,6 +5290,14 @@ + + + + + + + + @@ -5071,6 +5362,14 @@ + + + + + + + + @@ -5135,6 +5434,14 @@ + + + + + + + + @@ -5199,6 +5506,14 @@ + + + + + + + + @@ -5263,6 +5578,14 @@ + + + + + + + + @@ -5327,6 +5650,14 @@ + + + + + + + + @@ -5391,6 +5722,14 @@ + + + + + + + + @@ -5455,6 +5794,14 @@ + + + + + + + + @@ -5519,6 +5866,14 @@ + + + + + + + + @@ -5583,6 +5938,14 @@ + + + + + + + + @@ -5647,6 +6010,14 @@ + + + + + + + + @@ -5655,6 +6026,14 @@ + + + + + + + + @@ -5663,6 +6042,14 @@ + + + + + + + + @@ -5727,6 +6114,14 @@ + + + + + + + + @@ -5791,6 +6186,14 @@ + + + + + + + + @@ -5855,6 +6258,14 @@ + + + + + + + + @@ -5919,6 +6330,14 @@ + + + + + + + + @@ -5983,6 +6402,14 @@ + + + + + + + + @@ -6047,6 +6474,14 @@ + + + + + + + + @@ -6111,6 +6546,14 @@ + + + + + + + + @@ -6175,6 +6618,14 @@ + + + + + + + + @@ -6239,6 +6690,14 @@ + + + + + + + + @@ -6303,6 +6762,14 @@ + + + + + + + + @@ -6367,6 +6834,14 @@ + + + + + + + + @@ -6431,6 +6906,14 @@ + + + + + + + + @@ -6495,6 +6978,14 @@ + + + + + + + + @@ -6559,6 +7050,14 @@ + + + + + + + + @@ -6623,6 +7122,14 @@ + + + + + + + + @@ -6687,6 +7194,14 @@ + + + + + + + + @@ -6751,6 +7266,14 @@ + + + + + + + + From 4eaa8877c1844526b550f7d838c6883615a90d68 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Mon, 28 Oct 2024 21:27:09 +0100 Subject: [PATCH 06/15] fix crash when loading card images with unusual aspect ratio (#4738) closes https://github.com/tuskyapp/Tusky/issues/4725 I checked with examples from https://github.com/tuskyapp/Tusky/pull/2743 and looks like nothing broke. Not sure why the `.dontTransform()` was there. It prevents Glide from correctly sizing the image, leading to a crash.
Stacktrace ``` java.lang.RuntimeException: Canvas: trying to draw too large(401361624bytes) bitmap. at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:266) at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549) at android.widget.ImageView.onDraw(ImageView.java:1446) at com.google.android.material.imageview.ShapeableImageView.onDraw(ShapeableImageView.java:188) at android.view.View.draw(View.java:23266) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23269) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1994) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:5545) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23269) at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4944) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23269) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.fragment.app.FragmentContainerView.drawChild(FragmentContainerView.kt:232) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at androidx.fragment.app.FragmentContainerView.dispatchDraw(FragmentContainerView.kt:222) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22124) at android.view.View.draw(View.java:22997) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23269) at com.android.internal.policy.DecorView.draw(DecorView.java:821) at android.view.View.updateDisplayListIfDirty(View.java:22133) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:689) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:695) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:793) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4789) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4500) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3687) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2371) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9297) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239) at android.view.Choreographer.doCallbacks(Choreographer.java:899) at android.view.Choreographer.doFrame(Choreographer.java:832) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7924) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) ```
--- .../com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 84fd53502..e9d32764a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -1186,8 +1186,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { cardImage.setScaleType(ImageView.ScaleType.CENTER_CROP); RequestBuilder builder = Glide.with(cardImage.getContext()) - .load(card.getImage()) - .dontTransform(); + .load(card.getImage()); if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) { builder = builder.placeholder(decodeBlurHash(card.getBlurhash())); } @@ -1213,7 +1212,6 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { Glide.with(cardImage.getContext()) .load(decodeBlurHash(card.getBlurhash())) - .dontTransform() .into(cardImage); } else { cardView.setOrientation(LinearLayout.HORIZONTAL); From d7bb46cd67069522532d6ae3f9392ca23b5f2725 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Mon, 28 Oct 2024 21:27:21 +0100 Subject: [PATCH 07/15] fix pinning boosted posts (#4740) closes https://github.com/tuskyapp/Tusky/issues/4739 --- .../keylesspalace/tusky/fragment/SFragment.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.kt index c901ebff4..b5f07884e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.kt @@ -180,9 +180,10 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo protected fun more(status: Status, view: View, position: Int, translation: Translation?) { val id = status.actionableId - val accountId = status.actionableStatus.account.id - val accountUsername = status.actionableStatus.account.username - val statusUrl = status.actionableStatus.url + val actionableStatus = status.actionableStatus + val accountId = actionableStatus.account.id + val accountUsername = actionableStatus.account.username + val statusUrl = actionableStatus.url var loggedInAccountId: String? = null val activeAccount = accountManager.activeAccount if (activeAccount != null) { @@ -194,22 +195,21 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo if (statusIsByCurrentUser) { popup.inflate(R.menu.status_more_for_user) val menu = popup.menu - when (status.visibility) { + when (actionableStatus.visibility) { Status.Visibility.PUBLIC, Status.Visibility.UNLISTED -> { menu.add( 0, R.id.pin, 1, getString( - if (status.pinned) R.string.unpin_action else R.string.pin_action + if (actionableStatus.pinned) R.string.unpin_action else R.string.pin_action ) ) } Status.Visibility.PRIVATE -> { - val reblogged = status.reblog?.reblogged ?: status.reblogged - menu.findItem(R.id.status_reblog_private).isVisible = !reblogged - menu.findItem(R.id.status_unreblog_private).isVisible = reblogged + menu.findItem(R.id.status_reblog_private).isVisible = !actionableStatus.reblogged + menu.findItem(R.id.status_unreblog_private).isVisible = actionableStatus.reblogged } else -> {} @@ -298,7 +298,7 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo } R.id.status_download_media -> { - requestDownloadAllMedia(status) + requestDownloadAllMedia(actionableStatus) return@setOnMenuItemClickListener true } @@ -344,7 +344,7 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo R.id.pin -> { viewLifecycleOwner.lifecycleScope.launch { - timelineCases.pin(status.id, !status.pinned) + timelineCases.pin(status.actionableId, !actionableStatus.pinned) .onFailure { e: Throwable -> val message = e.message ?: getString(if (status.pinned) R.string.failed_to_unpin else R.string.failed_to_pin) From 781dce056e915d45cbe086c011fce403ebabe60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=E1=BB=93=20Nh=E1=BA=A5t=20Duy?= Date: Mon, 28 Oct 2024 20:13:27 +0000 Subject: [PATCH 08/15] Translated using Weblate (Vietnamese) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Vietnamese) Currently translated at 100.0% (652 of 652 strings) Co-authored-by: Hồ Nhất Duy Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/ Translation: Tusky/Tusky --- app/src/main/res/values-vi/strings.xml | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index c45ba6934..e331c8946 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -52,11 +52,11 @@ Xong ĐĂNG Quay lại - Tiếp tục + TIẾP TỤC Cập nhật Xóa ĐĂNG - Đăng nhập Mastodon + ĐĂNG NHẬP MASTODON Xóa và viết lại tút này\? Xóa tút này\? Bỏ theo dõi người này\? @@ -90,7 +90,7 @@ Đăng lại URL tút với… Đăng lại tút với… Đang lưu vào thiết bị - Tải xuống + Lưu media Đăng lại với tư cách … Mở với tư cách %1$s Chép URL @@ -98,7 +98,7 @@ Mở tập tin #%1$d Links Lượt nhắc tới - Hashtag + HASHTAG Xem lượt thích Xem lượt đăng lại Xem lượt đăng lại @@ -139,7 +139,7 @@ Thích Trang hồ sơ Đóng - Thử lại + THỬ LẠI Xóa & viết lại Xóa Sửa @@ -148,8 +148,8 @@ Ẩn lượt đăng lại Bỏ chặn Chặn - Bỏ theo dõi - Theo dõi + BỎ THEO DÕI + THEO DÕI Bạn có muốn đăng xuất tài khoản %1$s\? Dữ liệu của tài khoản sẽ bị xóa, bao gồm những bản nháp và thiết lập. Soạn tút Thêm @@ -183,10 +183,10 @@ Những tút đã lưu Người theo dõi Theo dõi - Ghim - Lượt trả lời - Tút - Nội dung tút + GHIM + LƯỢT TRẢ LỜI + TÚT + Tút Xếp tab Nhắn riêng Liên hợp @@ -288,13 +288,13 @@ Hiện nội dung nhạy cảm Đang theo dõi bạn %1$ds - %1$d phút - %1$d giờ + %1$dp + %1$dh %1$d ngày %1$d năm %1$ds %1$d phút - %1$d giờ + %1$dh%1$ giờ %1$d ngày %1$d năm Yêu cầu theo dõi @@ -322,7 +322,7 @@ Bình chọn Vuốt qua lại giữa các tab Không thể tìm thấy - Người + NGƯỜI Người này thuộc máy chủ khác. Gửi luôn cho máy chủ đó\? Báo cáo này sẽ được gửi tới kiểm duyệt viên. Hãy cho biết lý do vì sao bạn báo cáo người này bên dưới: Chưa tải được tút @@ -358,8 +358,8 @@ Soạn Soạn tút Áp dụng - Lọc - Xóa hết + LỌC + XÓA HẾT Danh sách Chọn danh sách Hashtag @@ -382,10 +382,10 @@ Thích bởi Đăng lại bởi - %1$s Đăng lại + %1$s đăng lại - %1$s Thích + %1$s thích Ghim Gỡ ghim @@ -393,7 +393,7 @@ Sử dụng thời gian thiết bị Nội dung Nhãn - thêm nội dung + THÊM NỘI DUNG Metadata CC-BY-SA 4.0 CC-BY 4.0 @@ -412,7 +412,7 @@ Để sau Bạn cần khởi động lại Tusky để áp dụng các thiết lập Yêu cầu khởi động lại ứng dụng - Đọc tút + Xem tút Mở rộng/Thu gọn toàn bộ tút Đang tra cứu… Bạn cần tải về bộ emoji này trước From 1071e978783a2e8617a80944ee044bfd3538dc6b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:40:26 +0100 Subject: [PATCH 09/15] fix(deps): update dependency androidx.fragment:fragment-ktx to v1.8.5 (#4745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [androidx.fragment:fragment-ktx](https://developer.android.com/jetpack/androidx/releases/fragment#1.8.5) ([source](https://cs.android.com/androidx/platform/frameworks/support)) | `1.8.4` -> `1.8.5` | [![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.fragment:fragment-ktx/1.8.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.fragment:fragment-ktx/1.8.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.fragment:fragment-ktx/1.8.4/1.8.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.fragment:fragment-ktx/1.8.4/1.8.5?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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d4caa12f6..7cf57b6d3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ androidx-constraintlayout = "2.1.4" androidx-core = "1.13.1" androidx-drawerlayout = "1.2.0" androidx-exifinterface = "1.3.7" -androidx-fragment = "1.8.4" +androidx-fragment = "1.8.5" androidx-hilt = "1.2.0" androidx-junit = "1.2.1" androidx-lifecycle = "2.8.6" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index ca21a55ed..7ee2f5b40 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -804,6 +804,14 @@
+ + + + + + + + @@ -858,6 +866,14 @@ + + + + + + + + @@ -4016,12 +4032,12 @@ - - - - - - + + + + + + From 3b86916b26bff583e9834b409b7c16bfdbb538bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:40:36 +0100 Subject: [PATCH 10/15] fix(deps): update dependency androidx.lifecycle:lifecycle-viewmodel-ktx to v2.8.7 (#4746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [androidx.lifecycle:lifecycle-viewmodel-ktx](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.8.7) ([source](https://cs.android.com/androidx/platform/frameworks/support)) | `2.8.6` -> `2.8.7` | [![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.lifecycle:lifecycle-viewmodel-ktx/2.8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.lifecycle:lifecycle-viewmodel-ktx/2.8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.lifecycle:lifecycle-viewmodel-ktx/2.8.6/2.8.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.lifecycle:lifecycle-viewmodel-ktx/2.8.6/2.8.7?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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 139 +++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7cf57b6d3..73ab1b86c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ androidx-exifinterface = "1.3.7" androidx-fragment = "1.8.5" androidx-hilt = "1.2.0" androidx-junit = "1.2.1" -androidx-lifecycle = "2.8.6" +androidx-lifecycle = "2.8.7" androidx-media3 = "1.4.1" androidx-paging = "3.3.2" androidx-preference = "1.2.1" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 7ee2f5b40..d39bce78f 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -981,6 +981,14 @@ + + + + + + + + @@ -1029,6 +1037,14 @@ + + + + + + + + @@ -1083,6 +1099,14 @@ + + + + + + + + @@ -1139,6 +1163,14 @@ + + + + + + + + @@ -1195,6 +1227,14 @@ + + + + + + + + @@ -1248,6 +1288,14 @@ + + + + + + + + @@ -1296,6 +1344,14 @@ + + + + + + + + @@ -1349,6 +1405,14 @@ + + + + + + + + @@ -1414,6 +1478,14 @@ + + + + + + + + @@ -1462,6 +1534,14 @@ + + + + + + + + @@ -1536,6 +1616,14 @@ + + + + + + + + @@ -1584,6 +1672,14 @@ + + + + + + + + @@ -1632,6 +1728,14 @@ + + + + + + + + @@ -1703,6 +1807,17 @@ + + + + + + + + + + + @@ -1751,6 +1866,14 @@ + + + + + + + + @@ -1831,6 +1954,14 @@ + + + + + + + + @@ -1885,6 +2016,14 @@ + + + + + + + + From 1dfec3656a524148b62f9407db7059949b2de0b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:53:13 +0100 Subject: [PATCH 11/15] fix(deps): update dependency androidx.constraintlayout:constraintlayout to v2.2.0 (#4748) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [androidx.constraintlayout:constraintlayout](https://developer.android.com/jetpack/androidx/releases/constraintlayout#2.2.0) ([source](https://cs.android.com/androidx/platform/frameworks/support)) | `2.1.4` -> `2.2.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.constraintlayout:constraintlayout/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.constraintlayout:constraintlayout/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.constraintlayout:constraintlayout/2.1.4/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.constraintlayout:constraintlayout/2.1.4/2.2.0?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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 73ab1b86c..24b6dfa41 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ androidx-activity = "1.9.3" androidx-appcompat = "1.7.0" androidx-browser = "1.8.0" androidx-cardview = "1.0.0" -androidx-constraintlayout = "2.1.4" +androidx-constraintlayout = "2.2.0" androidx-core = "1.13.1" androidx-drawerlayout = "1.2.0" androidx-exifinterface = "1.3.7" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index d39bce78f..f44711433 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -375,6 +375,14 @@ + + + + + + + + @@ -383,6 +391,14 @@ + + + + + + + + @@ -2439,6 +2455,14 @@ + + + + + + + + From a56c14340e3d2d2389e73c786bb743489d511534 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Mon, 4 Nov 2024 19:03:34 +0100 Subject: [PATCH 12/15] fix link preview images (#4751) Before (sometimes) vs after: I'm not sure what is going on here, Glide is being weird sometimes and this change fixes it. Regression from https://github.com/tuskyapp/Tusky/pull/4738 --- .../com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index e9d32764a..49894626e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -1190,7 +1190,8 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) { builder = builder.placeholder(decodeBlurHash(card.getBlurhash())); } - builder.into(cardImage); + builder.centerInside() + .into(cardImage); } else if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) { int radius = cardImage.getContext().getResources() .getDimensionPixelSize(R.dimen.card_radius); From 0d3480435936b6b9d85684f7bc9fdead52b329a6 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Tue, 5 Nov 2024 20:43:52 +0100 Subject: [PATCH 13/15] never filter own posts (#4742) This is to match Mastodon web behavior. Also, make revealing filtered boosts in non-cached timelines work (can only happen on user profiles, other timelines don't have boosts). found thanks to this: https://tech.lgbt/@darkfox/113378644538792719 --- .../notifications/NotificationsViewModel.kt | 3 +++ .../viewmodel/CachedTimelineViewModel.kt | 2 -- .../viewmodel/NetworkTimelineViewModel.kt | 2 +- .../timeline/viewmodel/TimelineViewModel.kt | 6 ++++++ .../components/viewthread/ViewThreadViewModel.kt | 16 +++++++--------- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt index 5e74003ec..838aecee0 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt @@ -153,6 +153,9 @@ class NotificationsViewModel @Inject constructor( return when ((notificationViewData as? NotificationViewData.Concrete)?.type) { Notification.Type.MENTION, Notification.Type.POLL -> { notificationViewData.statusViewData?.let { statusViewData -> + if (statusViewData.status.account.id == account.accountId) { + return Filter.Action.NONE + } statusViewData.filterAction = filterModel.shouldFilterStatus(statusViewData.actionable) return statusViewData.filterAction } diff --git a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt index 2685fda14..e315d5252 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt @@ -76,8 +76,6 @@ class CachedTimelineViewModel @Inject constructor( filterModel ) { - private val account = accountManager.activeAccount!! - private var currentPagingSource: PagingSource? = null /** Map from status id to translation. */ diff --git a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineViewModel.kt index 41b5eb0bf..ff95bc214 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineViewModel.kt @@ -304,7 +304,7 @@ class NetworkTimelineViewModel @Inject constructor( } override fun clearWarning(status: StatusViewData.Concrete) { - updateStatusByActionableId(status.id) { + updateStatusByActionableId(status.actionableId) { it.copy(filtered = emptyList()) } } diff --git a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt index 015725660..ff915ea7b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt @@ -46,6 +46,8 @@ abstract class TimelineViewModel( private val filterModel: FilterModel ) : ViewModel() { + protected val account = accountManager.activeAccount!! + abstract val statuses: Flow> var kind: Kind = Kind.HOME @@ -179,6 +181,10 @@ abstract class TimelineViewModel( protected fun shouldFilterStatus(statusViewData: StatusViewData): Filter.Action { val status = statusViewData.asStatusOrNull()?.status ?: return Filter.Action.NONE + if (status.actionableStatus.account.id == account.accountId) { + // never filter own posts + return Filter.Action.NONE + } return if ( (status.inReplyToId != null && filterRemoveReplies) || (status.reblog != null && filterRemoveReblogs) || diff --git a/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadViewModel.kt index 8f659c57b..13d1afa8e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadViewModel.kt @@ -68,6 +68,8 @@ class ViewThreadViewModel @Inject constructor( private val moshi: Moshi ) : ViewModel() { + private val activeAccount = accountManager.activeAccount!! + private val _uiState = MutableStateFlow(ThreadUiState.Loading as ThreadUiState) val uiState: Flow = _uiState.asStateFlow() @@ -80,14 +82,10 @@ class ViewThreadViewModel @Inject constructor( var isInitialLoad: Boolean = true - private val alwaysShowSensitiveMedia: Boolean - private val alwaysOpenSpoiler: Boolean + private val alwaysShowSensitiveMedia: Boolean = activeAccount.alwaysShowSensitiveMedia + private val alwaysOpenSpoiler: Boolean = activeAccount.alwaysOpenSpoiler init { - val activeAccount = accountManager.activeAccount - alwaysShowSensitiveMedia = activeAccount?.alwaysShowSensitiveMedia ?: false - alwaysOpenSpoiler = activeAccount?.alwaysOpenSpoiler ?: false - viewModelScope.launch { eventHub.events .collect { event -> @@ -109,7 +107,7 @@ class ViewThreadViewModel @Inject constructor( val filterCall = async { filterModel.init(Filter.Kind.THREAD) } val contextCall = async { api.statusContext(id) } - val statusAndAccount = db.timelineStatusDao().getStatusWithAccount(accountManager.activeAccount!!.id, id) + val statusAndAccount = db.timelineStatusDao().getStatusWithAccount(activeAccount.id, id) var detailedStatus = if (statusAndAccount != null) { Log.d(TAG, "Loaded status from local timeline") @@ -142,7 +140,7 @@ class ViewThreadViewModel @Inject constructor( if (statusAndAccount != null) { api.status(id).onSuccess { result -> db.timelineStatusDao().update( - tuskyAccountId = accountManager.activeAccount!!.id, + tuskyAccountId = activeAccount.id, status = result, moshi = moshi ) @@ -421,7 +419,7 @@ class ViewThreadViewModel @Inject constructor( private fun List.filter(): List { return filter { status -> - if (status.isDetailed) { + if (status.isDetailed || status.status.account.id == activeAccount.accountId) { true } else { status.filterAction = filterModel.shouldFilterStatus(status.status) From e7583218662327bcfd53882739bdccd344b648f4 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Tue, 5 Nov 2024 20:44:08 +0100 Subject: [PATCH 14/15] fix updating filter expiration to indefinite (#4743) Before we would not send `expires_in` when "indefinite" was selected. But that left the expiration at the value it was before. To actually set it to indefinite we need to send `expires_in`, but leave it empty. With a value class this was actually really nice to fix, the code now self-documents what the special values mean. Also fixes a regression from the Material 3 redesign where the filter duration drop down would not get populated when creating a filter. Found while working on https://github.com/tuskyapp/Tusky/pull/4742 --- .../keylesspalace/tusky/StatusListActivity.kt | 7 +-- .../components/filters/EditFilterActivity.kt | 38 ++++++++------ .../components/filters/EditFilterViewModel.kt | 52 +++++++++++++++---- .../components/filters/FilterExpiration.kt | 37 +++++++++++++ .../tusky/network/MastodonApi.kt | 9 ++-- .../com/keylesspalace/tusky/FilterV1Test.kt | 17 ------ 6 files changed, 108 insertions(+), 52 deletions(-) create mode 100644 app/src/main/java/com/keylesspalace/tusky/components/filters/FilterExpiration.kt diff --git a/app/src/main/java/com/keylesspalace/tusky/StatusListActivity.kt b/app/src/main/java/com/keylesspalace/tusky/StatusListActivity.kt index 2ffcc894b..d0cbc949d 100644 --- a/app/src/main/java/com/keylesspalace/tusky/StatusListActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/StatusListActivity.kt @@ -28,6 +28,7 @@ import com.google.android.material.snackbar.Snackbar import com.keylesspalace.tusky.appstore.EventHub import com.keylesspalace.tusky.appstore.FilterUpdatedEvent import com.keylesspalace.tusky.components.filters.EditFilterActivity +import com.keylesspalace.tusky.components.filters.FilterExpiration import com.keylesspalace.tusky.components.filters.FiltersActivity import com.keylesspalace.tusky.components.timeline.TimelineFragment import com.keylesspalace.tusky.components.timeline.viewmodel.TimelineViewModel.Kind @@ -251,7 +252,7 @@ class StatusListActivity : BottomSheetActivity() { title = "#$tag", context = listOf(Filter.Kind.HOME.kind), filterAction = Filter.Action.WARN.action, - expiresInSeconds = null + expiresIn = FilterExpiration.never ).fold( { filter -> if (mastodonApi.addFilterKeyword( @@ -281,7 +282,7 @@ class StatusListActivity : BottomSheetActivity() { listOf(Filter.Kind.HOME.kind), irreversible = false, wholeWord = true, - expiresInSeconds = null + expiresIn = FilterExpiration.never ).fold( { filter -> mutedFilterV1 = filter @@ -358,7 +359,7 @@ class StatusListActivity : BottomSheetActivity() { context = filter.context.filter { it != Filter.Kind.HOME.kind }, irreversible = null, wholeWord = null, - expiresInSeconds = null + expiresIn = FilterExpiration.never ) } else { mastodonApi.deleteFilterV1(filter.id) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt index e3daa6f7f..227cdcacb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt @@ -1,6 +1,20 @@ +/* Copyright 2024 Tusky contributors + * + * This file is a part of Tusky. + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Tusky; if not, + * see . */ + package com.keylesspalace.tusky.components.filters -import android.content.Context import android.content.DialogInterface.BUTTON_POSITIVE import android.os.Bundle import android.view.WindowManager @@ -28,7 +42,6 @@ import com.keylesspalace.tusky.util.isHttpNotFound import com.keylesspalace.tusky.util.viewBinding import com.keylesspalace.tusky.util.visible import dagger.hilt.android.AndroidEntryPoint -import java.util.Date import javax.inject.Inject import kotlinx.coroutines.launch @@ -124,6 +137,7 @@ class EditFilterActivity : BaseActivity() { if (originalFilter == null) { binding.filterActionWarn.isChecked = true + initializeDurationDropDown(false) } else { loadFilter() } @@ -165,7 +179,11 @@ class EditFilterActivity : BaseActivity() { // Populate the UI from the filter's members private fun loadFilter() { viewModel.load(filter) - val durationNames = if (filter.expiresAt != null) { + initializeDurationDropDown(withNoChange = filter.expiresAt != null) + } + + private fun initializeDurationDropDown(withNoChange: Boolean) { + val durationNames = if (withNoChange) { arrayOf(getString(R.string.duration_no_change)) + resources.getStringArray(R.array.filter_duration_names) } else { resources.getStringArray(R.array.filter_duration_names) @@ -322,19 +340,5 @@ class EditFilterActivity : BaseActivity() { companion object { const val FILTER_TO_EDIT = "FilterToEdit" - - // Mastodon *stores* the absolute date in the filter, - // but create/edit take a number of seconds (relative to the time the operation is posted) - fun getSecondsForDurationIndex(index: Int, context: Context?, default: Date? = null): Int? { - return when (index) { - -1 -> if (default == null) { - default - } else { - ((default.time - System.currentTimeMillis()) / 1000).toInt() - } - 0 -> null - else -> context?.resources?.getIntArray(R.array.filter_duration_values)?.get(index) - } - } } } diff --git a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterViewModel.kt index 9bde72187..881fd70e9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/filters/EditFilterViewModel.kt @@ -1,9 +1,25 @@ +/* Copyright 2024 Tusky contributors + * + * This file is a part of Tusky. + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Tusky; if not, + * see . */ + package com.keylesspalace.tusky.components.filters import android.content.Context import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import at.connyduck.calladapter.networkresult.fold +import com.keylesspalace.tusky.R import com.keylesspalace.tusky.entity.Filter import com.keylesspalace.tusky.entity.FilterKeyword import com.keylesspalace.tusky.network.MastodonApi @@ -112,12 +128,12 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( durationIndex: Int, context: Context ): Boolean { - val expiresInSeconds = EditFilterActivity.getSecondsForDurationIndex(durationIndex, context) + val expiration = getExpirationForDurationIndex(durationIndex, context) api.createFilter( title = title, context = contexts, filterAction = action, - expiresInSeconds = expiresInSeconds + expiresIn = expiration ).fold( { newFilter -> // This is _terrible_, but the all-in-one update filter api Just Doesn't Work @@ -133,7 +149,7 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( return ( throwable.isHttpNotFound() && // Endpoint not found, fall back to v1 api - createFilterV1(contexts, expiresInSeconds) + createFilterV1(contexts, expiration) ) } ) @@ -147,13 +163,13 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( durationIndex: Int, context: Context ): Boolean { - val expiresInSeconds = EditFilterActivity.getSecondsForDurationIndex(durationIndex, context) + val expiration = getExpirationForDurationIndex(durationIndex, context) api.updateFilter( id = originalFilter.id, title = title, context = contexts, filterAction = action, - expiresInSeconds = expiresInSeconds + expires = expiration ).fold( { // This is _terrible_, but the all-in-one update filter api Just Doesn't Work @@ -173,7 +189,7 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( { throwable -> if (throwable.isHttpNotFound()) { // Endpoint not found, fall back to v1 api - if (updateFilterV1(contexts, expiresInSeconds)) { + if (updateFilterV1(contexts, expiration)) { return true } } @@ -182,13 +198,13 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( ) } - private suspend fun createFilterV1(context: List, expiresInSeconds: Int?): Boolean { + private suspend fun createFilterV1(context: List, expiration: FilterExpiration?): Boolean { return _keywords.value.map { keyword -> - api.createFilterV1(keyword.keyword, context, false, keyword.wholeWord, expiresInSeconds) + api.createFilterV1(keyword.keyword, context, false, keyword.wholeWord, expiration) }.none { it.isFailure } } - private suspend fun updateFilterV1(context: List, expiresInSeconds: Int?): Boolean { + private suspend fun updateFilterV1(context: List, expiration: FilterExpiration?): Boolean { val results = _keywords.value.map { keyword -> if (originalFilter == null) { api.createFilterV1( @@ -196,7 +212,7 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( context = context, irreversible = false, wholeWord = keyword.wholeWord, - expiresInSeconds = expiresInSeconds + expiresIn = expiration ) } else { api.updateFilterV1( @@ -205,7 +221,7 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( context = context, irreversible = false, wholeWord = keyword.wholeWord, - expiresInSeconds = expiresInSeconds + expiresIn = expiration ) } } @@ -213,4 +229,18 @@ class EditFilterViewModel @Inject constructor(val api: MastodonApi) : ViewModel( return results.none { it.isFailure } } + + companion object { + // Mastodon *stores* the absolute date in the filter, + // but create/edit take a number of seconds (relative to the time the operation is posted) + private fun getExpirationForDurationIndex(index: Int, context: Context): FilterExpiration? { + return when (index) { + -1 -> FilterExpiration.unchanged + 0 -> FilterExpiration.never + else -> FilterExpiration.seconds( + context.resources.getIntArray(R.array.filter_duration_values)[index] + ) + } + } + } } diff --git a/app/src/main/java/com/keylesspalace/tusky/components/filters/FilterExpiration.kt b/app/src/main/java/com/keylesspalace/tusky/components/filters/FilterExpiration.kt new file mode 100644 index 000000000..27d1290d4 --- /dev/null +++ b/app/src/main/java/com/keylesspalace/tusky/components/filters/FilterExpiration.kt @@ -0,0 +1,37 @@ +/* Copyright 2024 Tusky contributors + * + * This file is a part of Tusky. + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Tusky; if not, + * see . */ + +package com.keylesspalace.tusky.components.filters + +import kotlin.jvm.JvmInline + +/** + * Custom class to have typesafety for filter expirations. + * Retrofit will call toString when sending this class as part of a form-urlencoded body. + */ +@JvmInline +value class FilterExpiration private constructor(val seconds: Int) { + + override fun toString(): String { + return if (seconds < 0) "" else seconds.toString() + } + + companion object { + val unchanged: FilterExpiration? = null + val never: FilterExpiration = FilterExpiration(-1) + + fun seconds(seconds: Int): FilterExpiration = FilterExpiration(seconds) + } +} diff --git a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt index 4c265d4f8..1611697ce 100644 --- a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt +++ b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt @@ -16,6 +16,7 @@ package com.keylesspalace.tusky.network import at.connyduck.calladapter.networkresult.NetworkResult +import com.keylesspalace.tusky.components.filters.FilterExpiration import com.keylesspalace.tusky.entity.AccessToken import com.keylesspalace.tusky.entity.Account import com.keylesspalace.tusky.entity.Announcement @@ -540,7 +541,7 @@ interface MastodonApi { @Field("context[]") context: List, @Field("irreversible") irreversible: Boolean?, @Field("whole_word") wholeWord: Boolean?, - @Field("expires_in") expiresInSeconds: Int? + @Field("expires_in") expiresIn: FilterExpiration? ): NetworkResult @FormUrlEncoded @@ -551,7 +552,7 @@ interface MastodonApi { @Field("context[]") context: List, @Field("irreversible") irreversible: Boolean?, @Field("whole_word") wholeWord: Boolean?, - @Field("expires_in") expiresInSeconds: Int? + @Field("expires_in") expiresIn: FilterExpiration? ): NetworkResult @DELETE("api/v1/filters/{id}") @@ -563,7 +564,7 @@ interface MastodonApi { @Field("title") title: String, @Field("context[]") context: List, @Field("filter_action") filterAction: String, - @Field("expires_in") expiresInSeconds: Int? + @Field("expires_in") expiresIn: FilterExpiration? ): NetworkResult @FormUrlEncoded @@ -573,7 +574,7 @@ interface MastodonApi { @Field("title") title: String? = null, @Field("context[]") context: List? = null, @Field("filter_action") filterAction: String? = null, - @Field("expires_in") expiresInSeconds: Int? = null + @Field("expires_in") expires: FilterExpiration? = null ): NetworkResult @DELETE("api/v2/filters/{id}") diff --git a/app/src/test/java/com/keylesspalace/tusky/FilterV1Test.kt b/app/src/test/java/com/keylesspalace/tusky/FilterV1Test.kt index b28447aba..fd3912cb7 100644 --- a/app/src/test/java/com/keylesspalace/tusky/FilterV1Test.kt +++ b/app/src/test/java/com/keylesspalace/tusky/FilterV1Test.kt @@ -19,7 +19,6 @@ package com.keylesspalace.tusky import androidx.test.ext.junit.runners.AndroidJUnit4 import at.connyduck.calladapter.networkresult.NetworkResult -import com.keylesspalace.tusky.components.filters.EditFilterActivity import com.keylesspalace.tusky.components.instanceinfo.InstanceInfoRepository import com.keylesspalace.tusky.entity.Attachment import com.keylesspalace.tusky.entity.Filter @@ -277,22 +276,6 @@ class FilterV1Test { ) } - @Test - fun unchangedExpiration_shouldBeNegative_whenFilterIsExpired() { - val expiredBySeconds = 3600 - val expiredDate = Date.from(Instant.now().minusSeconds(expiredBySeconds.toLong())) - val updatedDuration = EditFilterActivity.getSecondsForDurationIndex(-1, null, expiredDate) - assert(updatedDuration != null && updatedDuration <= -expiredBySeconds) - } - - @Test - fun unchangedExpiration_shouldBePositive_whenFilterIsUnexpired() { - val expiresInSeconds = 3600 - val expiredDate = Date.from(Instant.now().plusSeconds(expiresInSeconds.toLong())) - val updatedDuration = EditFilterActivity.getSecondsForDurationIndex(-1, null, expiredDate) - assert(updatedDuration != null && updatedDuration > (expiresInSeconds - 60)) - } - companion object { fun mockStatus( content: String = "", From dad57b074b397bba8d3af5e1df0a67b98ed8aa35 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:44:27 +0100 Subject: [PATCH 15/15] chore(deps): update dependency com.android.application to v8.7.2 (#4750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.android.application](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.7.1` -> `8.7.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application/8.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.application/8.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.application/8.7.1/8.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application/8.7.1/8.7.2?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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tuskyapp/Tusky). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Conny Duck --- gradle/libs.versions.toml | 2 +- gradle/verification-metadata.xml | 523 +++++++++++++++++++++++++++++++ 2 files changed, 524 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 24b6dfa41..b8c44e513 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.7.1" +agp = "8.7.2" androidx-activity = "1.9.3" androidx-appcompat = "1.7.0" androidx-browser = "1.8.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index f44711433..dafd380b2 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -546,6 +546,14 @@ + + + + + + + + @@ -618,6 +626,14 @@ + + + + + + + + @@ -690,6 +706,14 @@ + + + + + + + + @@ -3098,6 +3122,14 @@ + + + + + + + + @@ -3170,6 +3202,14 @@ + + + + + + + + @@ -3215,6 +3255,11 @@ + + + + + @@ -3287,6 +3332,14 @@ + + + + + + + + @@ -3359,6 +3412,14 @@ + + + + + + + + @@ -3431,6 +3492,14 @@ + + + + + + + + @@ -3503,6 +3572,14 @@ + + + + + + + + @@ -3575,6 +3652,14 @@ + + + + + + + + @@ -3647,6 +3732,14 @@ + + + + + + + + @@ -3719,6 +3812,14 @@ + + + + + + + + @@ -3791,6 +3892,14 @@ + + + + + + + + @@ -3863,6 +3972,14 @@ + + + + + + + + @@ -3935,6 +4052,14 @@ + + + + + + + + @@ -4007,6 +4132,14 @@ + + + + + + + + @@ -4079,6 +4212,14 @@ + + + + + + + + @@ -4205,6 +4346,20 @@ + + + + + + + + + + + + + + @@ -4277,6 +4432,14 @@ + + + + + + + + @@ -4349,6 +4512,14 @@ + + + + + + + + @@ -4421,6 +4592,14 @@ + + + + + + + + @@ -4493,6 +4672,14 @@ + + + + + + + + @@ -4565,6 +4752,14 @@ + + + + + + + + @@ -4637,6 +4832,14 @@ + + + + + + + + @@ -4709,6 +4912,14 @@ + + + + + + + + @@ -4805,6 +5016,14 @@ + + + + + + + + @@ -4877,6 +5096,14 @@ + + + + + + + + @@ -4949,6 +5176,14 @@ + + + + + + + + @@ -5021,6 +5256,14 @@ + + + + + + + + @@ -5117,6 +5360,14 @@ + + + + + + + + @@ -5189,6 +5440,14 @@ + + + + + + + + @@ -5261,6 +5520,14 @@ + + + + + + + + @@ -5333,6 +5600,14 @@ + + + + + + + + @@ -5405,6 +5680,14 @@ + + + + + + + + @@ -5477,6 +5760,14 @@ + + + + + + + + @@ -5549,6 +5840,14 @@ + + + + + + + + @@ -5621,6 +5920,14 @@ + + + + + + + + @@ -5693,6 +6000,14 @@ + + + + + + + + @@ -5765,6 +6080,14 @@ + + + + + + + + @@ -5837,6 +6160,14 @@ + + + + + + + + @@ -5909,6 +6240,14 @@ + + + + + + + + @@ -5981,6 +6320,14 @@ + + + + + + + + @@ -6053,6 +6400,14 @@ + + + + + + + + @@ -6125,6 +6480,14 @@ + + + + + + + + @@ -6197,6 +6560,14 @@ + + + + + + + + @@ -6213,6 +6584,14 @@ + + + + + + + + @@ -6229,6 +6608,14 @@ + + + + + + + + @@ -6301,6 +6688,14 @@ + + + + + + + + @@ -6373,6 +6768,14 @@ + + + + + + + + @@ -6445,6 +6848,14 @@ + + + + + + + + @@ -6517,6 +6928,14 @@ + + + + + + + + @@ -6589,6 +7008,14 @@ + + + + + + + + @@ -6661,6 +7088,14 @@ + + + + + + + + @@ -6733,6 +7168,14 @@ + + + + + + + + @@ -6805,6 +7248,14 @@ + + + + + + + + @@ -6877,6 +7328,14 @@ + + + + + + + + @@ -6949,6 +7408,14 @@ + + + + + + + + @@ -7021,6 +7488,14 @@ + + + + + + + + @@ -7093,6 +7568,14 @@ + + + + + + + + @@ -7165,6 +7648,14 @@ + + + + + + + + @@ -7237,6 +7728,14 @@ + + + + + + + + @@ -7309,6 +7808,14 @@ + + + + + + + + @@ -7381,6 +7888,14 @@ + + + + + + + + @@ -7453,6 +7968,14 @@ + + + + + + + +