diff --git a/app/src/main/java/app/pachli/MainActivity.kt b/app/src/main/java/app/pachli/MainActivity.kt index 88321bcd9..c439416a1 100644 --- a/app/src/main/java/app/pachli/MainActivity.kt +++ b/app/src/main/java/app/pachli/MainActivity.kt @@ -1247,7 +1247,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider { header.clear() header.profiles = profiles header.setActiveProfile(accountManager.activeAccount!!.id) - binding.mainToolbar.subtitle = if (accountManager.shouldDisplaySelfUsername(this)) { + binding.mainToolbar.subtitle = if (accountManager.shouldDisplaySelfUsername()) { accountManager.activeAccount!!.fullName } else { null diff --git a/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt b/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt index 4e8499a05..5c3ada3ae 100644 --- a/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt +++ b/app/src/main/java/app/pachli/components/compose/ComposeActivity.kt @@ -276,7 +276,7 @@ class ComposeActivity : setupButtons() subscribeToUpdates(mediaAdapter) - if (accountManager.shouldDisplaySelfUsername(this)) { + if (accountManager.shouldDisplaySelfUsername()) { binding.composeUsernameView.text = getString( R.string.compose_active_account_description, activeAccount.fullName, diff --git a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt index 59d2881c6..161327189 100644 --- a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt +++ b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt @@ -55,6 +55,7 @@ import app.pachli.core.preferences.DownloadLocation import app.pachli.core.preferences.MainNavigationPosition import app.pachli.core.preferences.PrefKeys import app.pachli.core.preferences.SharedPreferencesRepository +import app.pachli.core.preferences.ShowSelfUsername import app.pachli.core.ui.extensions.await import app.pachli.core.ui.makeIcon import app.pachli.databinding.AccountNotificationDetailsListItemBinding @@ -196,13 +197,10 @@ class PreferencesFragment : PreferenceFragmentCompat() { icon = makeIcon(GoogleMaterial.Icon.gmd_format_size) } - listPreference { - setDefaultValue("disambiguate") - setEntries(R.array.pref_show_self_username_names) - setEntryValues(R.array.pref_show_self_username_values) - key = PrefKeys.SHOW_SELF_USERNAME - setSummaryProvider { entry } + enumListPreference { + setDefaultValue(ShowSelfUsername.DISAMBIGUATE) setTitle(R.string.pref_title_show_self_username) + key = PrefKeys.SHOW_SELF_USERNAME isSingleLineTitle = false } diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index af22c2fd7..fff13b87c 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -482,7 +482,6 @@ لا يمكن تحرير الصورة. التعديلات هناك شكوى جديدة - أبداً تشغيل الاشعارات عندما يقوم شخص انت مشترك معه بنشر منشور جديد ارسال إشعار عند تحرير المنشورات التي تفاعلت معها شكاوي @@ -529,7 +528,6 @@ مثيل الخادم هذا لا يدعم متابعة الوسوم. تجاهل التعديلات الاستمرار في التعديل - دائماً ALT %s أبلغ عن %s %s · %d منشورات ملحقة @@ -544,7 +542,6 @@ شارك رابط الحساب الى… شارك اسم مستخدم الحساب إلى… تم نسخ اسم المستخدم - عند تسجيل الدخول إلى حسابات متعددة الآن الغاء متابعة #%s ؟ كتم الاشعارات diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index a00006db4..180fcaf36 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -131,12 +131,9 @@ Схаваныя Толькі для падпісчыкаў Маленькі - Калі вы ўвайшлі ў некалькі ўліковых запісаў - Ніколі Сярэдні Вялікі Найбольшы - Заўсёды Запыты на падпіску Апавяшчаць аб запытах на падпіску Пашырэнні diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 296baf7b5..b890b7b15 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -428,9 +428,6 @@ <no vàlid> Aquesta instància no admet seguir hashtags. %s s\'ha registrat - Sempre - Quan s\'inicien la sessió amb diversos comptes - Mai S\'ha produït un error en activar #%s S\'ha produït un error en silenciar #%s S\'ha editat %s diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index cdb92d001..edfac90b5 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -437,8 +437,6 @@ Koncept byl smazán Připnutí se nezdařilo Zrušení připnutí se nezdařilo - Vždy - Nikdy %s (%s) Upravit obrázek 14 dní @@ -449,7 +447,6 @@ příspěvek, se kterým jsem interagoval/a, je upraven někdo se zaregistroval někdo, ke komu jsem přihlášen/a, zveřejnil nový příspěvek - Když je přihlášeno více účtů Nové příspěvky Registrace Oznámení o nových uživatelích diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 1154ae9b4..cfd436368 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -330,8 +330,6 @@ 6 awr Diwrnod Dadbinio - Byth - Bob tro Atodiadau Golygu llun Hybwyd gan @@ -438,7 +436,6 @@ %1$s Golygwyd - Pan fydd cyfrifon lluosog wedi\'u mewngofnodi Wedi methu llwytho gwybodaeth Ateb Agor negeseuon wedi\'u marcio â rhybudd cynnwys bob tro Label diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 4543fd55b..e4a50be31 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -470,9 +470,6 @@ Profilname in der Hauptnavigation anzeigen Anheften fehlgeschlagen Lösen fehlgeschlagen - Immer - Wenn mit mehreren Konten angemeldet - Niemals %s (%s) Sprache des Beitrags Fokuspunkt setzen diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 0d5b50d4e..df38cd7c3 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -467,9 +467,6 @@ Ĉu forigi tiun planitan mesaĝon\? (Neniu ŝanĝo) %s (%s) - Ĉiam - Kiam vi uzas plurajn kontojn - Neniam Montri uzantnomon en ilobreto Mesaĝolingvo diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 8e4dd275f..1e8cb8573 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -446,8 +446,6 @@ Pedir confirmación antes de marcar como favorito una publicación con la que interactué se editó Esta imagen no puede ser editada. - Siempre - Nunca añadir reacción alguien se registró Error al seguir #%s @@ -464,7 +462,6 @@ 365 días Fallo al fijar Fallo al quitarlo - Cuando hay varias cuentas ingresadas Notificaciones de nuevos usuarios Ediciones de una publicación Notificaciones cuando se editan publicaciones con las que has interactuado diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index ffd16497f..b9b4201a8 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -461,9 +461,6 @@ شکست در برداشتن سنجاق تصویر نتوانست ویرایش شود. زبان فرسته - همیشه - هنگام ورود چندین حساب - هرگز نمایش نام کاربری در نوارابزارها افزودن واکنش تنظیم نقطهٔ تمرکز diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 54a85af22..b68294b1c 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -229,8 +229,6 @@ Näytä aina arkaluonteinen sisältö Lähettäminen peruutettu Seuraajat - Aina - Ei koskaan Buustaukset Suosikit Äänestykset @@ -348,7 +346,6 @@ seuraamani tili on tehnyt uuden julkaisun Käytä Chromen sisäänrakennettuja välilehtiä <ei asetettu> - Kun kirjauduttu useammalla tilille Ilmoitukset julkaisujesi tehostuksista Ilmoitukset julkaisujesi tykkäyksistä Ilmoitukset seuraamispyynnöistä diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f40ad7245..29dddb2e7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -469,8 +469,6 @@ L\'image n’a pas pu être retouchée. Supprimer ce message planifié \? %s (%s) - Toujours - Jamais Langue du message (Aucune modification) ajouter une réaction @@ -492,7 +490,6 @@ Définir le point focal Description Image - Quand plusieurs comptes sont connectés Le téléversement a échoué Afficher les brouillons Ignorer diff --git a/app/src/main/res/values-gd/strings.xml b/app/src/main/res/values-gd/strings.xml index 9bdf96330..f316a255e 100644 --- a/app/src/main/res/values-gd/strings.xml +++ b/app/src/main/res/values-gd/strings.xml @@ -475,9 +475,6 @@ Seall an t-ainm-cleachdaiche air na bàraichean-inneal Thoir gogag no slaod an cearcall a thaghadh puing an fhòcais a chithear air na dealbhagan an-còmhnaidh. Cànan a’ phuist - An-còmhnaidh - Nuair a bhios iomadh cunntas air an clàradh a-steach - Chan ann idir %s (%s) Suidhich puing an fhòcais A bheil thu airson am post sgeidealaichte seo a sguabadh às\? diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index a8a88b287..25ff32fa2 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -460,9 +460,6 @@ Eliminar publicación programada\? Fallo ao Fixar Fallo ao Desafixar - Sempre - Cando hai máis dunha conta activa - Nunca Notificacións sobre temas de moderación Spam Non seguir #%s\? diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 25ef312ba..8a989af5a 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -459,9 +459,6 @@ Koppintsd vagy húzd a kört, hogy kijelöld azt a fókuszpontot, mely mindig látható lesz az előnézetekben. %s (%s) Bejegyzés nyelve - Mindig - Ha több fiók is be van jelentkezve - Soha (Nincs változás) Fókuszpont beállítása Hiba a #%s követésekor diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index d806574bd..449b7d2cc 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -91,8 +91,6 @@ Sedang Besar Terbesar - Selalu - Jangan Pernah Pengikut Baru Notifikasi tentang pengikut baru Daftar diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 9eb3ca242..408546f88 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -458,10 +458,7 @@ Vista drög\? (Viðhengi verða send inn aftur þegar þú endurheimtir drögin.) Mistókst að festa Mistókst að losa - Alltaf - Þegar er skráð inn á mörgum aðgöngum Setja virknistað - Aldrei Birta notandanafn á verkfærastikum Sjálfgefið tungumál færslna %s (%s) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index dd53c0aec..c27ae5d54 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -493,9 +493,6 @@ Tappa o crea un cerchio per scegliere il punto focale che sarà sempre visibile nelle anteprime. Imposta punto focale Lingua del post - Sempre - Mai - Quando connesso con più account (nessuna modifica) Mostra nome utente nella barra strumenti Salvare bozza? (gli allegati verranno ricaricati quando ripristini la bozza.) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index d85e85395..a3a984063 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -407,9 +407,6 @@ リブログしました 下書きの保存中… デフォルトの投稿言語 - 常に表示 - 複数アカウントでのログイン時 - 表示しない 新しい投稿 あなたが購読した誰かが新しい投稿をしたときの通知 単語全体 diff --git a/app/src/main/res/values-kab/strings.xml b/app/src/main/res/values-kab/strings.xml index 4b10b81b8..bcd780893 100644 --- a/app/src/main/res/values-kab/strings.xml +++ b/app/src/main/res/values-kab/strings.xml @@ -242,7 +242,6 @@ %1$s Aglam Tugna - Werǧin Imesli 1+ tura diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 5874a47cc..b1239ddc8 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -90,8 +90,6 @@ Vidējs Liels Lielākais - Vienmēr - Nekad Aptaujas Ziņojumi Pachli %s @@ -399,7 +397,6 @@ Pievienot jaunu Mastodon kontu Animēt pielāgotās emocijzīmes Jaunu dalībnieku reģistrācija - Kad pievienoti vairāki konti Nepieciešama lietotnes restartēšana Pastiprināt sākotnējai auditorijai Pastiprināts diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 436b601b8..c2a2e0ae2 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -456,9 +456,6 @@ Innleggspråk Sett fokuspunkt Trykk eller dra sirkelen for å velge fokuspunktet som alltid skal være synlig i miniatyrbilder. - Alltid - Når flere konti er logget inn - Aldri Vis brukernavn på verktøylinjer Slette dette planlagte innlegget\? Lagre utkast\? (Vedlegg vil bli lastet opp igjen når du fortsetter å jobbe på utkastet.) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 0fa3c0038..27362b792 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -458,9 +458,6 @@ (geen verandering) Gebruikersnaam op werkbalken tonen Tik of sleep de cirkel naar een centraal focuspunt dat op elke thumbnail zichtbaar moet blijven. - Altijd - Wanneer meerdere accounts zijn ingelogd - Nooit %s (%s) Focuspunt instellen Fout tijdens het volgen van #%s diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 8b1147c38..762caf44f 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -427,8 +427,6 @@ Fracàs en penjant Fracàs en despenjant Lenga de la publicacion - Totjorn - Jamai Publicacions modificadas >1 14 jorns @@ -450,7 +448,6 @@ 365 jorns Tocatz o lisatz lo cercle per causir lo punt focal que deu aparéisser sus las miniaturas. Mostrar lo nom d’utilizaire dins la barra d’aisinas - Quand mai d’un compte es connectat Posicionar lo punt focal Se tornar connectar per recebre las notificacions instantanèas Demandar confirmacion abans d’apondre en favorit diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 6b2c80e37..1fd5643ba 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -487,9 +487,6 @@ Naciśnij lub przeciągnij kółko, aby wybrać punkt centralny, który będzie zawsze widoczny w miniaturkach. Odobserwuj #%s\? Domyślny język wpisów - Nigdy - Zawsze - Gdy wiele kont jest zalogowanych teraz dodaj reakcję %s zgłosił/a %s diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 77f3fe3a6..5f00ce429 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -453,10 +453,8 @@ Desabilitado <não definido> <inválido> - Sempre A imagem não pôde ser editada. A mídia deve ter uma descrição. - Nunca ALT Erro ao silenciar #%s Nome de usuário copiado @@ -479,7 +477,6 @@ Violação de regra Spam Outros - Quando várias contas estão conectadas A porta deve estar entre %d e %d 1+ agora diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 9cdec2816..b550ff7c6 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -465,9 +465,6 @@ Toca ou arrasta o círculo para escolher o ponto de focagem que estará sempre visível nas pré-visualizações. %s(%s) (Sem alteração) - Sempre - Quando autenticado em várias contas - Nunca Idioma da publicação Mostrar o nome de utilizador nas barras de ferramentas Define o ponto de focagem diff --git a/app/src/main/res/values-sa/strings.xml b/app/src/main/res/values-sa/strings.xml index fc48d9c14..e2b23c9d5 100644 --- a/app/src/main/res/values-sa/strings.xml +++ b/app/src/main/res/values-sa/strings.xml @@ -402,7 +402,6 @@ ३६५ दिनानि (परिवर्तनं नास्ति) सूचनाः सम्दृश्यन्ताम् - न कदापि पूर्वनिविष्टा प्रकाशका भाषा आवेदनानि सम्पादनानि निवेद्यन्ताम् @@ -415,7 +414,6 @@ अन्यम् इदं सम्भाषणं निष्कास्यताम् \? कश्चन पञ्जीकरणम् अकरोत् - सर्वदा नूतन-प्रकटनानि पञ्जीकरणानि उद्घोषणाः न सन्ति। diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 7b8762501..92a09aa01 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -426,14 +426,11 @@ Radera detta schemalagda inlägg\? Kunde inte avfölja #%s Radera denna konversation\? - Alltid Tryck eller dra cirkeln för att välja fokuspunkten som alltid kommer synas i miniatyrbilder. Varaktighet Oändligt Sluta prenumerera Inläggsspråk - När flera konton är inloggade - Aldrig Registreringar Notiser om nya användare Inläggsredigeringar diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index c780d746f..232984d87 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -403,9 +403,6 @@ Kaydedildi! İstenmeyen Diğer - Daima - Birden fazla oturum açıldığında - Asla Gözdelere eklemeden önce onay kutusunu göster Susturmayı kaldırma hatası #%s yeni bir rapor olduğunda diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 51d509cff..f022b00af 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -475,10 +475,7 @@ Мова допису (Не змінено) Налаштувати точку фокусування - Завжди Торкніться або перетягніть коло, щоб вибрати точку фокусування, яку завжди буде видно на мініатюрах. - Якщо ви ввійшли у кілька облікових записів - Ніколи Показувати ім\'я користувача на панелях інструментів Видалити цей запланований допис\? Не вдалося прикріпити diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 761635cc9..0603e96c9 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -445,9 +445,6 @@ Chọn tâm điểm Nhấn hoặc kéo vòng tròn để chọn tiêu điểm sẽ hiển thị trong hình thu nhỏ. Hiện URL của tôi trên tab - Luôn luôn - Khi đăng nhập nhiều tài khoản - Không hiện Bạn có chắc muốn xóa tút đã lên lịch\? Lưu bản nháp\? (Bạn sẽ cần tải lên lại file đính kèm) Không thể bỏ ghim diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 2aa91803d..c1cc4db3d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -458,10 +458,7 @@ 嘟文语言 设置焦点 轻按或拖动圆圈选择始终在缩略图中可见的焦点。 - 登录多个账户时 在工具栏中显示用户名 - 始终 - 从不 删除这条定时嘟文吗? 保存草稿?(恢复草稿时附件将被再次上传) 固定失败 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index e5064f27b..f4a444cab 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -445,9 +445,6 @@ 在工具列顯示使用者名稱 標註為喜歡前顯示確認對話框 加入自 %1$s - 總是 - 登入多個帳號時 - 從不 註冊 新使用者通知 嘟文編輯 diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index 68f1e320f..631b2dd29 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -176,12 +176,6 @@ ja - - always - disambiguate - never - - @string/duration_5_min @string/duration_30_min diff --git a/app/src/main/res/values/string-arrays.xml b/app/src/main/res/values/string-arrays.xml index 69a534cc0..98fc722be 100644 --- a/app/src/main/res/values/string-arrays.xml +++ b/app/src/main/res/values/string-arrays.xml @@ -14,12 +14,6 @@ @string/post_text_size_largest - - @string/pref_show_self_username_always - @string/pref_show_self_username_disambiguate - @string/pref_show_self_username_never - - @string/title_home @string/title_notifications diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c5335d617..b1ea9ae13 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -296,9 +296,6 @@ Medium Large Largest - Always - When multiple accounts logged in - Never New mentions Notifications about new mentions New followers diff --git a/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt b/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt index 7703b0c01..35e439de2 100644 --- a/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt +++ b/core/data/src/main/kotlin/app/pachli/core/data/repository/AccountManager.kt @@ -17,7 +17,6 @@ package app.pachli.core.data.repository -import android.content.Context import app.pachli.core.common.di.ApplicationScope import app.pachli.core.database.dao.AccountDao import app.pachli.core.database.dao.RemoteKeyDao @@ -25,8 +24,8 @@ import app.pachli.core.database.model.AccountEntity import app.pachli.core.network.model.Account import app.pachli.core.network.model.Status import app.pachli.core.network.retrofit.InstanceSwitchAuthInterceptor -import app.pachli.core.preferences.PrefKeys import app.pachli.core.preferences.SharedPreferencesRepository +import app.pachli.core.preferences.ShowSelfUsername import java.util.Locale import javax.inject.Inject import javax.inject.Singleton @@ -270,15 +269,11 @@ class AccountManager @Inject constructor( /** * @return true if the name of the currently-selected account should be displayed in UIs */ - fun shouldDisplaySelfUsername(context: Context): Boolean { - val showUsernamePreference = sharedPreferencesRepository.getString(PrefKeys.SHOW_SELF_USERNAME, "disambiguate") - if (showUsernamePreference == "always") { - return true + fun shouldDisplaySelfUsername(): Boolean { + return when (sharedPreferencesRepository.showSelfUsername) { + ShowSelfUsername.ALWAYS -> true + ShowSelfUsername.DISAMBIGUATE -> accounts.size > 1 + ShowSelfUsername.NEVER -> false } - if (showUsernamePreference == "never") { - return false - } - - return accounts.size > 1 // "disambiguate" } } diff --git a/core/preferences/src/main/kotlin/app/pachli/core/preferences/SharedPreferencesRepository.kt b/core/preferences/src/main/kotlin/app/pachli/core/preferences/SharedPreferencesRepository.kt index 85e42f8ec..f2e4a5201 100644 --- a/core/preferences/src/main/kotlin/app/pachli/core/preferences/SharedPreferencesRepository.kt +++ b/core/preferences/src/main/kotlin/app/pachli/core/preferences/SharedPreferencesRepository.kt @@ -73,6 +73,10 @@ class SharedPreferencesRepository @Inject constructor( val mainNavigationPosition: MainNavigationPosition get() = getEnum(PrefKeys.MAIN_NAV_POSITION, MainNavigationPosition.TOP) + /** When to show the account's username in the title. */ + val showSelfUsername: ShowSelfUsername + get() = getEnum(PrefKeys.SHOW_SELF_USERNAME, ShowSelfUsername.DISAMBIGUATE) + val tabTapBehaviour: TabTapBehaviour get() = getEnum(PrefKeys.TAB_TAP_BEHAVIOUR, TabTapBehaviour.JUMP_TO_NEXT_PAGE) diff --git a/core/preferences/src/main/kotlin/app/pachli/core/preferences/ShowSelfUsername.kt b/core/preferences/src/main/kotlin/app/pachli/core/preferences/ShowSelfUsername.kt new file mode 100644 index 000000000..8a697faa7 --- /dev/null +++ b/core/preferences/src/main/kotlin/app/pachli/core/preferences/ShowSelfUsername.kt @@ -0,0 +1,31 @@ +/* + * Copyright 2024 Pachli Association + * + * This file is a part of Pachli. + * + * 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. + * + * Pachli 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 Pachli; if not, + * see . + */ + +package app.pachli.core.preferences + +/** When to show the account's username in the title. */ +enum class ShowSelfUsername(override val displayResource: Int, override val value: String? = null) : + PreferenceEnum { + /** Always show the username. */ + ALWAYS(R.string.pref_show_self_username_always, "always"), + + /** Show the username if more than one account is logged in. */ + DISAMBIGUATE(R.string.pref_show_self_username_disambiguate, "disambiguate"), + + /** Never show the username. */ + NEVER(R.string.pref_show_self_username_never, "never"), +} diff --git a/core/preferences/src/main/res/values-ar/strings.xml b/core/preferences/src/main/res/values-ar/strings.xml index 127f882a2..e8d16481b 100644 --- a/core/preferences/src/main/res/values-ar/strings.xml +++ b/core/preferences/src/main/res/values-ar/strings.xml @@ -16,4 +16,7 @@ الألسنة الأعلى الأسفل + دائماً + عند تسجيل الدخول إلى حسابات متعددة + أبداً diff --git a/core/preferences/src/main/res/values-be/strings.xml b/core/preferences/src/main/res/values-be/strings.xml index 6af73c0b4..868a18ad5 100644 --- a/core/preferences/src/main/res/values-be/strings.xml +++ b/core/preferences/src/main/res/values-be/strings.xml @@ -10,4 +10,7 @@ Укладкі Зверху Знізу + Заўсёды + Калі вы ўвайшлі ў некалькі ўліковых запісаў + Ніколі diff --git a/core/preferences/src/main/res/values-ca/strings.xml b/core/preferences/src/main/res/values-ca/strings.xml index 4e33ec26a..b9ce22e43 100644 --- a/core/preferences/src/main/res/values-ca/strings.xml +++ b/core/preferences/src/main/res/values-ca/strings.xml @@ -16,4 +16,7 @@ Pestanyes A dalt A baix + Sempre + Quan s\'inicien la sessió amb diversos comptes + Mai diff --git a/core/preferences/src/main/res/values-cs/strings.xml b/core/preferences/src/main/res/values-cs/strings.xml index f345acede..20da45c26 100644 --- a/core/preferences/src/main/res/values-cs/strings.xml +++ b/core/preferences/src/main/res/values-cs/strings.xml @@ -16,4 +16,7 @@ Panely Nahoře Dole + Vždy + Když je přihlášeno více účtů + Nikdy diff --git a/core/preferences/src/main/res/values-cy/strings.xml b/core/preferences/src/main/res/values-cy/strings.xml index f7982d28f..0370acca8 100644 --- a/core/preferences/src/main/res/values-cy/strings.xml +++ b/core/preferences/src/main/res/values-cy/strings.xml @@ -9,4 +9,7 @@ Tabiau Brig Gwaelod + Bob tro + Pan fydd cyfrifon lluosog wedi\'u mewngofnodi + Byth diff --git a/core/preferences/src/main/res/values-de/strings.xml b/core/preferences/src/main/res/values-de/strings.xml index a442ac177..f343b6cdf 100644 --- a/core/preferences/src/main/res/values-de/strings.xml +++ b/core/preferences/src/main/res/values-de/strings.xml @@ -16,4 +16,7 @@ Tabs Oben Unten + Immer + Wenn mit mehreren Konten angemeldet + Niemals diff --git a/core/preferences/src/main/res/values-eo/strings.xml b/core/preferences/src/main/res/values-eo/strings.xml index af3229a65..8dfc16a91 100644 --- a/core/preferences/src/main/res/values-eo/strings.xml +++ b/core/preferences/src/main/res/values-eo/strings.xml @@ -16,4 +16,7 @@ Langetoj Supro Malsupro + Ĉiam + Kiam vi uzas plurajn kontojn + Neniam diff --git a/core/preferences/src/main/res/values-es/strings.xml b/core/preferences/src/main/res/values-es/strings.xml index cb2e73881..9ab132a5d 100644 --- a/core/preferences/src/main/res/values-es/strings.xml +++ b/core/preferences/src/main/res/values-es/strings.xml @@ -16,4 +16,7 @@ Pestañas Arriba Abajo + Siempre + Cuando hay varias cuentas ingresadas + Nunca diff --git a/core/preferences/src/main/res/values-fa/strings.xml b/core/preferences/src/main/res/values-fa/strings.xml index cf96d6c39..fe062c007 100644 --- a/core/preferences/src/main/res/values-fa/strings.xml +++ b/core/preferences/src/main/res/values-fa/strings.xml @@ -16,4 +16,7 @@ زبانه‌ها بالا پایین + همیشه + هنگام ورود چندین حساب + هرگز diff --git a/core/preferences/src/main/res/values-fi/strings.xml b/core/preferences/src/main/res/values-fi/strings.xml index a5d52c90c..726a4f182 100644 --- a/core/preferences/src/main/res/values-fi/strings.xml +++ b/core/preferences/src/main/res/values-fi/strings.xml @@ -16,4 +16,7 @@ Välilehdet Yläreuna Alareuna + Aina + Kun kirjauduttu useammalla tilille + Ei koskaan diff --git a/core/preferences/src/main/res/values-fr/strings.xml b/core/preferences/src/main/res/values-fr/strings.xml index 836965976..9e1307578 100644 --- a/core/preferences/src/main/res/values-fr/strings.xml +++ b/core/preferences/src/main/res/values-fr/strings.xml @@ -16,4 +16,7 @@ Aller au contenu le plus récent Haut Bas + Toujours + Quand plusieurs comptes sont connectés + Jamais diff --git a/core/preferences/src/main/res/values-gd/strings.xml b/core/preferences/src/main/res/values-gd/strings.xml index 07fa20f73..f189e61f5 100644 --- a/core/preferences/src/main/res/values-gd/strings.xml +++ b/core/preferences/src/main/res/values-gd/strings.xml @@ -9,4 +9,7 @@ Tabaichean Aig a’ bhàrr Aig a’ bhonn + An-còmhnaidh + Nuair a bhios iomadh cunntas air an clàradh a-steach + Chan ann idir diff --git a/core/preferences/src/main/res/values-gl/strings.xml b/core/preferences/src/main/res/values-gl/strings.xml index 8543e7ad2..489e91f92 100644 --- a/core/preferences/src/main/res/values-gl/strings.xml +++ b/core/preferences/src/main/res/values-gl/strings.xml @@ -13,4 +13,7 @@ Lapelas Arriba Abaixo + Sempre + Cando hai máis dunha conta activa + Nunca diff --git a/core/preferences/src/main/res/values-hu/strings.xml b/core/preferences/src/main/res/values-hu/strings.xml index d0c61457b..b704b3522 100644 --- a/core/preferences/src/main/res/values-hu/strings.xml +++ b/core/preferences/src/main/res/values-hu/strings.xml @@ -16,4 +16,7 @@ Fülek Fent Lent + Mindig + Ha több fiók is be van jelentkezve + Soha diff --git a/core/preferences/src/main/res/values-in/strings.xml b/core/preferences/src/main/res/values-in/strings.xml index 3224ceb5c..2d6ef1abb 100644 --- a/core/preferences/src/main/res/values-in/strings.xml +++ b/core/preferences/src/main/res/values-in/strings.xml @@ -16,4 +16,6 @@ Tab Atas Bawah + Selalu + Jangan Pernah diff --git a/core/preferences/src/main/res/values-is/strings.xml b/core/preferences/src/main/res/values-is/strings.xml index 26e2345f3..705f928f8 100644 --- a/core/preferences/src/main/res/values-is/strings.xml +++ b/core/preferences/src/main/res/values-is/strings.xml @@ -9,4 +9,7 @@ Flipar Efst Neðst + Alltaf + Þegar er skráð inn á mörgum aðgöngum + Aldrei diff --git a/core/preferences/src/main/res/values-it/strings.xml b/core/preferences/src/main/res/values-it/strings.xml index a81a63595..32127b142 100644 --- a/core/preferences/src/main/res/values-it/strings.xml +++ b/core/preferences/src/main/res/values-it/strings.xml @@ -16,4 +16,7 @@ Schede In cima In fondo + Sempre + Quando connesso con più account + Mai diff --git a/core/preferences/src/main/res/values-ja/strings.xml b/core/preferences/src/main/res/values-ja/strings.xml index 0c3d1a705..8d6986611 100644 --- a/core/preferences/src/main/res/values-ja/strings.xml +++ b/core/preferences/src/main/res/values-ja/strings.xml @@ -16,4 +16,7 @@ タブ 上部 下部 + 常に表示 + 複数アカウントでのログイン時 + 表示しない diff --git a/core/preferences/src/main/res/values-kab/strings.xml b/core/preferences/src/main/res/values-kab/strings.xml index e9d797280..ebf30dc58 100644 --- a/core/preferences/src/main/res/values-kab/strings.xml +++ b/core/preferences/src/main/res/values-kab/strings.xml @@ -8,4 +8,5 @@ Iccaren Afella Adda + Werǧin diff --git a/core/preferences/src/main/res/values-lv/strings.xml b/core/preferences/src/main/res/values-lv/strings.xml index 594395f4b..36c6900f7 100644 --- a/core/preferences/src/main/res/values-lv/strings.xml +++ b/core/preferences/src/main/res/values-lv/strings.xml @@ -11,4 +11,7 @@ Cilnes Augšā Apakšā + Vienmēr + Kad pievienoti vairāki konti + Nekad diff --git a/core/preferences/src/main/res/values-nb-rNO/strings.xml b/core/preferences/src/main/res/values-nb-rNO/strings.xml index 46dfe8a0d..feb3ff24b 100644 --- a/core/preferences/src/main/res/values-nb-rNO/strings.xml +++ b/core/preferences/src/main/res/values-nb-rNO/strings.xml @@ -11,4 +11,7 @@ Faner Topp Bunn + Alltid + Når flere konti er logget inn + Aldri diff --git a/core/preferences/src/main/res/values-nl/strings.xml b/core/preferences/src/main/res/values-nl/strings.xml index cf8a9c033..7198702b6 100644 --- a/core/preferences/src/main/res/values-nl/strings.xml +++ b/core/preferences/src/main/res/values-nl/strings.xml @@ -16,4 +16,7 @@ Tabs Boven Onder + Altijd + Wanneer meerdere accounts zijn ingelogd + Nooit diff --git a/core/preferences/src/main/res/values-oc/strings.xml b/core/preferences/src/main/res/values-oc/strings.xml index add00ff99..bf42a15b0 100644 --- a/core/preferences/src/main/res/values-oc/strings.xml +++ b/core/preferences/src/main/res/values-oc/strings.xml @@ -9,4 +9,7 @@ Onglets Ennaut Enbàs + Totjorn + Quand mai d’un compte es connectat + Jamai diff --git a/core/preferences/src/main/res/values-pl/strings.xml b/core/preferences/src/main/res/values-pl/strings.xml index 4a6421f4b..a7d99ef41 100644 --- a/core/preferences/src/main/res/values-pl/strings.xml +++ b/core/preferences/src/main/res/values-pl/strings.xml @@ -16,4 +16,7 @@ Karty Góra Dół + Zawsze + Gdy wiele kont jest zalogowanych + Nigdy diff --git a/core/preferences/src/main/res/values-pt-rBR/strings.xml b/core/preferences/src/main/res/values-pt-rBR/strings.xml index 5079d1a31..57634c527 100644 --- a/core/preferences/src/main/res/values-pt-rBR/strings.xml +++ b/core/preferences/src/main/res/values-pt-rBR/strings.xml @@ -16,4 +16,7 @@ Abas Superior Inferior + Sempre + Quando várias contas estão conectadas + Nunca diff --git a/core/preferences/src/main/res/values-pt-rPT/strings.xml b/core/preferences/src/main/res/values-pt-rPT/strings.xml index d52cef969..e54d13d4f 100644 --- a/core/preferences/src/main/res/values-pt-rPT/strings.xml +++ b/core/preferences/src/main/res/values-pt-rPT/strings.xml @@ -16,4 +16,7 @@ Guias Superior Inferior + Sempre + Quando autenticado em várias contas + Nunca diff --git a/core/preferences/src/main/res/values-sa/strings.xml b/core/preferences/src/main/res/values-sa/strings.xml index dfe9a4e69..6223d7091 100644 --- a/core/preferences/src/main/res/values-sa/strings.xml +++ b/core/preferences/src/main/res/values-sa/strings.xml @@ -10,4 +10,6 @@ पीठिकाः शिखरम् नितलम् + सर्वदा + न कदापि diff --git a/core/preferences/src/main/res/values-sv/strings.xml b/core/preferences/src/main/res/values-sv/strings.xml index 6c6529d7c..79265be16 100644 --- a/core/preferences/src/main/res/values-sv/strings.xml +++ b/core/preferences/src/main/res/values-sv/strings.xml @@ -16,4 +16,7 @@ Flikar Topp Botten + Alltid + När flera konton är inloggade + Aldrig diff --git a/core/preferences/src/main/res/values-tr/strings.xml b/core/preferences/src/main/res/values-tr/strings.xml index 5212915dc..345746e17 100644 --- a/core/preferences/src/main/res/values-tr/strings.xml +++ b/core/preferences/src/main/res/values-tr/strings.xml @@ -16,4 +16,7 @@ Sekmeler Üst Alt + Daima + Birden fazla oturum açıldığında + Asla diff --git a/core/preferences/src/main/res/values-uk/strings.xml b/core/preferences/src/main/res/values-uk/strings.xml index ac71b73ff..e9d111607 100644 --- a/core/preferences/src/main/res/values-uk/strings.xml +++ b/core/preferences/src/main/res/values-uk/strings.xml @@ -16,4 +16,7 @@ Вкладки Вгорі Внизу + Завжди + Якщо ви ввійшли у кілька облікових записів + Ніколи diff --git a/core/preferences/src/main/res/values-vi/strings.xml b/core/preferences/src/main/res/values-vi/strings.xml index cf4b9373b..106c5ec37 100644 --- a/core/preferences/src/main/res/values-vi/strings.xml +++ b/core/preferences/src/main/res/values-vi/strings.xml @@ -10,4 +10,7 @@ Tabs Trên màn hình Dưới màn hình + Luôn luôn + Khi đăng nhập nhiều tài khoản + Không hiện diff --git a/core/preferences/src/main/res/values-zh-rCN/strings.xml b/core/preferences/src/main/res/values-zh-rCN/strings.xml index 6598ac0b3..3ecefab9f 100644 --- a/core/preferences/src/main/res/values-zh-rCN/strings.xml +++ b/core/preferences/src/main/res/values-zh-rCN/strings.xml @@ -16,4 +16,7 @@ 附件 顶部 底部 + 始终 + 登录多个账户时 + 从不 diff --git a/core/preferences/src/main/res/values-zh-rTW/strings.xml b/core/preferences/src/main/res/values-zh-rTW/strings.xml index 32dfd4e4f..420e86e78 100644 --- a/core/preferences/src/main/res/values-zh-rTW/strings.xml +++ b/core/preferences/src/main/res/values-zh-rTW/strings.xml @@ -16,4 +16,7 @@ 標籤頁 頂端 底端 + 總是 + 登入多個帳號時 + 從不 diff --git a/core/preferences/src/main/res/values/strings.xml b/core/preferences/src/main/res/values/strings.xml index bd5206df7..f16a53b9c 100644 --- a/core/preferences/src/main/res/values/strings.xml +++ b/core/preferences/src/main/res/values/strings.xml @@ -34,4 +34,7 @@ Jump to newest content Top Bottom + Always + When multiple accounts logged in + Never