Skip to content

Commit

Permalink
Merge branch 'tuskyapp:develop' into default_theme_system
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceFox authored Jul 17, 2023
2 parents 15e2e1e + a751312 commit 758a9f4
Show file tree
Hide file tree
Showing 47 changed files with 628 additions and 99 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1

- name: Gradle Build Action
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}

- name: ktlint
run: ./gradlew clean ktlintCheck

- name: Regular lint
run: ./gradlew app:lintGreenDebug

- name: Test
run: ./gradlew app:testGreenDebugUnitTest

- name: Build
run: ./gradlew app:buildGreenDebug
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@

### Significant bug fixes

## v23.0

### New features and other improvements

- **New preference to scale UI text**, [PR#3248](https://github.com/tuskyapp/Tusky/pull/3248) by [@nikclayton](https://mastodon.social/@nikclayton)

### Significant bug fixes

- **Save account information correctly**, [PR#3720](https://github.com/tuskyapp/Tusky/pull/3720) by [@connyduck](https://chaos.social/@ConnyDuck)
- If you were logged in with multiple accounts it was possible to switch accounts in a way that the UI showed the new account, but database operations were happening using the old account.
- **"pull" notifications on devices running Android versions <= 11**, [PR#3649](https://github.com/tuskyapp/Tusky/pull/3649) by [@nikclayton](https://mastodon.social/@nikclayton)
- Pull notifications (i.e., not using ntfy.sh) could silently fail on devices running Android 11 and below
- **Work around Android bug where text fields could "forget" they can copy/paste**, [PR#3707](https://github.com/tuskyapp/Tusky/pull/3707) by [@nikclayton](https://mastodon.social/@nikclayton)
- **Viewing "diffs" in edit history will not extend off screen edge**, [PR#3431](https://github.com/tuskyapp/Tusky/pull/3431) by [@nikclayton](https://mastodon.social/@nikclayton)
- **Don't crash if your server has no post edit history**, [PR#3747](https://github.com/tuskyapp/Tusky/pull/3747) by [@nikclayton](https://mastodon.social/@nikclayton)
- Your Mastodon server might know that a post has been edited, but not know the details of those edits. Trying to view the history of those statuses no longer crashes.
- **Add a "Delete" button when editing a filter**, [PR#3553](https://github.com/tuskyapp/Tusky/pull/3553) by [@Tak](https://mastodon.gamedev.place/@Tak)
- **Show non-square emoji correctly**, [PR#3711](https://github.com/tuskyapp/Tusky/pull/3711) by [@connyduck](https://chaos.social/@ConnyDuck)
- **Potential crash when editing profile fields**, [PR#3808](https://github.com/tuskyapp/Tusky/pull/3808) by [@nikclayton](https://mastodon.social/@nikclayton)
- **Oversized context menu when editing image descriptions**, [PR#3787](https://github.com/tuskyapp/Tusky/pull/3787) by [@connyduck](https://chaos.social/@ConnyDuck)

## v23.0 beta 2

### Significant bug fixes

- **Potential crash when editing profile fields**, [PR#3808](https://github.com/tuskyapp/Tusky/pull/3808) by [@nikclayton](https://mastodon.social/@nikclayton)
- **Oversized context menu when editing image descriptions**, [PR#3787](https://github.com/tuskyapp/Tusky/pull/3787) by [@connyduck](https://chaos.social/@ConnyDuck)

## v23.0 beta 1

### New features and other improvements
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
namespace "com.keylesspalace.tusky"
minSdk 23
targetSdk 33
versionCode 111
versionName "23.0 beta 1"
versionCode 113
versionName "23.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

Expand Down Expand Up @@ -147,7 +147,7 @@ dependencies {
implementation libs.conscrypt.android

implementation libs.bundles.glide
kapt libs.glide.compiler
ksp libs.glide.compiler

implementation libs.bundles.rxjava3

Expand Down
7 changes: 7 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
<!-- Ensure we are warned about errors in the baseline -->
<issue id="LintBaseline" severity="warning" />

<!-- Warn about typos. The typo database in lint is not exhaustive, and it's unclear
how to add to it when it's wrong. -->
<issue id="Typos" severity="warning" />

<!-- Set OldTargetApi back to warning -->
<issue id="OldTargetApi" severity="warning" />

<!-- Mark all other lint issues as errors -->
<issue id="all" severity="error" />
</lint>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import android.os.Bundle
import android.util.Log
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
import android.widget.FrameLayout
import android.widget.LinearLayout
Expand Down Expand Up @@ -273,7 +274,13 @@ class TabPreferenceActivity : BaseActivity(), Injectable, ItemInteractionListene
}

private fun showSelectListDialog() {
val adapter = ArrayAdapter<MastoList>(this, android.R.layout.simple_list_item_1)
val adapter = object : ArrayAdapter<MastoList>(this, android.R.layout.simple_list_item_1) {
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
val view = super.getView(position, convertView, parent)
getItem(position)?.let { item -> (view as TextView).text = item.title }
return view
}
}

val statusLayout = LinearLayout(this)
statusLayout.gravity = Gravity.CENTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,10 @@ class ComposeActivity :
val split = contentInfo.partition { item: ClipData.Item -> item.uri != null }
split.first?.let { content ->
for (i in 0 until content.clip.itemCount) {
pickMedia(content.clip.getItemAt(i).uri)
pickMedia(
content.clip.getItemAt(i).uri,
contentInfo.clip.description.label as String?
)
}
}
return split.second
Expand Down Expand Up @@ -1064,9 +1067,9 @@ class ComposeActivity :
viewModel.removeMediaFromQueue(item)
}

private fun pickMedia(uri: Uri) {
private fun pickMedia(uri: Uri, description: String? = null) {
lifecycleScope.launch {
viewModel.pickMedia(uri).onFailure { throwable ->
viewModel.pickMedia(uri, description).onFailure { throwable ->
val errorString = when (throwable) {
is FileSizeException -> {
val decimalFormat = DecimalFormat("0.##")
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_view_thread.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

<com.keylesspalace.tusky.view.BackgroundMessageView
android:id="@+id/statusView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
Expand Down
26 changes: 18 additions & 8 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="error_generic">Ein Fehler ist aufgetreten.</string>
<string name="error_network">Ein Netzwerkfehler ist aufgetreten! Bitte überprüfe deine Internetverbindung und versuche es erneut!</string>
<string name="error_network">Ein Netzwerkfehler ist aufgetreten. Bitte überprüfe deine Internetverbindung und versuche es erneut.</string>
<string name="error_empty">Das darf nicht leer sein.</string>
<string name="error_invalid_domain">Ungültige Domain angegeben</string>
<string name="error_failed_app_registration">Authentifizieren mit dieser Instanz fehlgeschlagen. Falls das Problem weiter besteht, versuche dich über den Browser anzumelden.</string>
Expand Down Expand Up @@ -63,7 +63,7 @@
<string name="action_compose">Beitrag erstellen</string>
<string name="action_login">Mit Tusky anmelden</string>
<string name="action_logout">Abmelden</string>
<string name="action_logout_confirm">Möchtest du dich vom Konto %1$s wirklich abmelden\?</string>
<string name="action_logout_confirm">Möchtest du %1$s wirklich abmelden\? Dadurch werden alle lokalen Daten des Profils, wie Entwürfe und Einstellungen, gelöscht.</string>
<string name="action_follow">Folgen</string>
<string name="action_unfollow">Entfolgen</string>
<string name="action_block">Blockieren</string>
Expand Down Expand Up @@ -198,7 +198,7 @@
<string name="post_privacy_public">Öffentlich</string>
<string name="post_privacy_unlisted">Nicht gelistet</string>
<string name="post_privacy_followers_only">Nur Follower</string>
<string name="pref_post_text_size">Schriftgröße</string>
<string name="pref_post_text_size">Schriftgröße von Beiträgen</string>
<string name="post_text_size_smallest">Kleiner</string>
<string name="post_text_size_small">Klein</string>
<string name="post_text_size_medium">Normal</string>
Expand Down Expand Up @@ -613,8 +613,8 @@
<string name="send_account_link_to">Profil-Link teilen an …</string>
<string name="send_account_username_to">Profilname teilen an …</string>
<string name="account_username_copied">Profilname kopiert</string>
<string name="status_edit_info">%1$s bearbeitete</string>
<string name="status_created_info">%1$s erstellte</string>
<string name="status_edit_info">Bearbeitet: %1$s</string>
<string name="status_created_info">Erstellt: %1$s</string>
<string name="notification_report_format">Neue Meldung über %s</string>
<string name="notification_report_description">Benachrichtigungen über Moderationsmeldungen</string>
<string name="pref_title_notification_filter_reports">es eine neue Meldung gibt</string>
Expand All @@ -625,8 +625,8 @@
<string name="error_status_source_load">Die Statusquelle konnte nicht vom Server geladen werden.</string>
<string name="title_public_trending_hashtags">Angesagte Hashtags</string>
<string name="accessibility_talking_about_tag">%1$d Leute schreiben über den Hashtag %2$s</string>
<string name="total_usage">Insgesamt verwendet</string>
<string name="total_accounts">Konten insgesamt</string>
<string name="total_usage">Insg. verwendet</string>
<string name="total_accounts">Konten insg.</string>
<string name="dialog_follow_hashtag_title">Hashtag folgen</string>
<string name="dialog_follow_hashtag_hint">#Hashtag</string>
<string name="action_refresh">Aktualisieren</string>
Expand Down Expand Up @@ -664,4 +664,14 @@
\nDamit du andere Konten entdeckst, kannst du entweder andere Timelines lesen – z. B. die Lokale Timeline deiner Instanz [iconics gmd_group] – oder du suchst nach Namen [iconics gmd_search] – z. B. Tusky, um unser Mastodon-Konto zu finden.</string>
<string name="post_media_image">Bild</string>
<string name="pref_title_show_stat_inline">Beitragsstatistiken in der Timeline anzeigen</string>
</resources>
<string name="pref_ui_text_size">Schriftgröße der Oberfläche</string>
<string name="notification_prune_cache">Cache-Wartung …</string>
<string name="notification_listenable_worker_description">Benachrichtigungen, wenn Tusky im Hintergrund aktiv ist</string>
<string name="notification_listenable_worker_name">Hintergrundaktivität</string>
<string name="notification_notification_worker">Benachrichtigungen werden abgerufen …</string>
<string name="load_newest_notifications">Neueste Benachrichtigungen laden</string>
<string name="compose_delete_draft">Entwurf löschen\?</string>
<string name="error_missing_edits">Deinem Server ist bekannt, dass dieser Beitrag bearbeitet wurde. Allerdings besitzt er keine Kopien der Änderungen, weshalb diese nicht angezeigt werden können.
\n
\nHierbei handelt es sich um <a href="https://github.com/mastodon/mastodon/issues/25398">Mastodon Issue #25398</a>.</string>
</resources>
8 changes: 6 additions & 2 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="error_generic">Ha ocurrido un error.</string>
<string name="error_network">¡Se ha producido un error de red! Por favor, comprueba tu conexión e inténtalo de nuevo.</string>
<string name="error_network">Se ha producido un error de red. Por favor, comprueba tu conexión e inténtalo de nuevo.</string>
<string name="error_empty">Este campo no puede estar vacío.</string>
<string name="error_invalid_domain">Nombre de dominio incorrecto</string>
<string name="error_failed_app_registration">Fallo de autenticación con esta instancia. Si esto persiste, prueba en el menú Iniciar sesión con el navegador.</string>
Expand Down Expand Up @@ -685,4 +685,8 @@
<string name="action_add">Añadir</string>
<string name="filter_keyword_display_format">%s (palabra completa)</string>
<string name="filter_keyword_addition_title">Añadir palabra</string>
</resources>
<string name="pref_ui_text_size">Tamaño de fuente</string>
<string name="notification_notification_worker">Obteniendo notificaciones…</string>
<string name="load_newest_notifications">Cargar nuevas notificaciones</string>
<string name="compose_delete_draft">¿Eliminar borrador\?</string>
</resources>
13 changes: 9 additions & 4 deletions app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
<string name="label_remote_account">ممکن است اطلاعات زیر نمایهٔ کاربر را ناقص نشان دهد. برای گشودن نمایهٔ کامل در مرورگر، لمس کنید.</string>
<string name="unpin_action">برداشتن سنجاق</string>
<string name="pin_action">سنجاق کردن</string>
<string name="error_network">یک خطای شبکه رخ داد! لطفا اتصال خود را بررسی و دوباره تلاش کنید!</string>
<string name="error_network">خطای شبکه‌ای رخ داد. لطفاً اتصالتان را بررسی و دوباره تلاش کنید.</string>
<string name="title_direct_messages">پیام‌های مستقیم</string>
<string name="title_tab_preferences">زبانه‌ها</string>
<string name="title_posts_pinned">سنجاق شده</string>
Expand Down Expand Up @@ -517,7 +517,7 @@
<string name="notification_update_description">آگاهی‌ها هنگام ویرایش فرسته‌هایی که با آن‌ها تعامل داشته‌اید</string>
<string name="action_unbookmark">برداشن نشانک</string>
<string name="dialog_push_notification_migration_other_accounts">برای اعطای اجازهٔ اشتراک آگاهی‌های ارسالی به تاسکی، دوباره به حسابتان وارد شدید. با این حال هنوز حساب‌هایی دیگر دارید که این‌گونه مهاجرت داده نشده‌اند. به آن‌ها رفته و برای به کار انداختن پشتیبانی آگاهی‌های UnifiedPush یکی‌یکی دوباره وارد شوید.</string>
<string name="action_logout_confirm">مطمئنید که می‌خواهید از حساب %1$s خارج شوید؟</string>
<string name="action_logout_confirm">مطمئنید که می‌خواهید از %1$s خارج شوید؟ این کار تمامی داده‌های محلی از جمله پیش‌نویس‌ها و ترجیحات را حذف خواهد کرد.</string>
<string name="duration_14_days">۱۴ روز</string>
<string name="duration_30_days">۳۰ روز</string>
<string name="duration_60_days">۶۰ روز</string>
Expand Down Expand Up @@ -595,8 +595,8 @@
<string name="pref_summary_http_proxy_invalid">&lt;نامعتبر&gt;</string>
<string name="pref_title_reading_order">ترتیب خواندن</string>
<string name="pref_reading_order_newest_first">نخست جدیدترین</string>
<string name="status_edit_info">%1$s را ویراست</string>
<string name="status_created_info">%1$s را ایجاد کرد</string>
<string name="status_edit_info">ویراسته: %1$s</string>
<string name="status_created_info">ایجاد شده: %1$s</string>
<string name="action_post_failed">بارگذاری شکست خورد</string>
<string name="action_post_failed_show_drafts">نمایش پیش‌نویس‌ها</string>
<string name="action_post_failed_do_nothing">رد کردن</string>
Expand Down Expand Up @@ -669,4 +669,9 @@
<string name="error_missing_edits">کارسازتان می‌داند که این فرسته ویرایش شده؛ ولی رونوشتی از ویرایش‌ها ندارد. پس نمی‌توانند نشانتان داده شوند.
\n
\nاین <a href="https://github.com/mastodon/mastodon/issues/25398">نکتهٔ ماستودون</a> را ببینید.</string>
<string name="pref_ui_text_size">اندازهٔ متن میانای کاربری</string>
<string name="notification_listenable_worker_name">فعّالیت پس‌زمینه</string>
<string name="notification_listenable_worker_description">آگاهی‌ها هنگامی که تاسکی در پس‌زمینه کار می‌کند</string>
<string name="notification_notification_worker">واکشی آگاهی‌ها…</string>
<string name="notification_prune_cache">نگه‌داری انباره…</string>
</resources>
7 changes: 6 additions & 1 deletion app/src/main/res/values-gd/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
<string name="error_failed_app_registration">Dh’fhàillig leis an dearbhadh leis an ionstans ud. Ma mhaireas an duilgheadas seo, feuch “Clàraich a-steach le brabhsair” on chlàr-taice.</string>
<string name="error_invalid_domain">Chuir thu a-steach àrainn-lìn mì-dhligheach</string>
<string name="error_empty">Chan fhaod seo a bhith falamh.</string>
<string name="error_network">Thachair mearachd leis an lìonra! Thoir sùil air a’ cheangal agad is feuch ris a-rithist!</string>
<string name="error_network">Thachair mearachd leis an lìonra. Thoir sùil air a’ cheangal agad is feuch ris a-rithist.</string>
<string name="error_generic">Thachair mearachd.</string>
<string name="follow_requests_info">Ged nach eil an cunntas agad glaiste, tha sgioba %1$s dhen bheachd gum b’ fheàirrde thu lèirmheas a dhèanamh air na h-iarrtasan leantainn o na cunntasan seo a làimh.</string>
<string name="dialog_delete_conversation_warning">A bheil thu airson an còmhradh seo a sguabadh às\?</string>
Expand Down Expand Up @@ -686,4 +686,9 @@
<string name="error_missing_edits">Tha fios aig an fhrithealaiche gun deach am post seo a dheasachadh ach chan eil lethbhreac dhen deasachadh aige-san is chan urrainn dhuinn a shealltainn dhut.
\n
\nSeo <a href="https://github.com/mastodon/mastodon/issues/25398">duilgheadas Mastodon #25398</a>.</string>
<string name="pref_ui_text_size">Meud teacsa na eadar-aghaidh</string>
<string name="notification_listenable_worker_name">Gnìomhachd sa chùlaibh</string>
<string name="notification_listenable_worker_description">Brathan nuair a bhios Tusky ag obair sa chùlaibh</string>
<string name="notification_notification_worker">A’ faighinn nam brathan…</string>
<string name="notification_prune_cache">Obair-ghlèidhidh air an tasgadan…</string>
</resources>
Loading

0 comments on commit 758a9f4

Please sign in to comment.