From 3ed443814a2d121a7ebf3fc8097437887c34c6cd Mon Sep 17 00:00:00 2001 From: esckey Date: Sun, 12 Nov 2023 19:22:52 +0100 Subject: [PATCH] Update 'README.md' --- .idea/icon.png | Bin 27414 -> 27413 bytes README.md | 2 + app/src/blue/res/mipmap-hdpi/ic_launcher.png | Bin 4696 -> 4695 bytes app/src/blue/res/mipmap-mdpi/ic_launcher.png | Bin 2945 -> 2944 bytes app/src/blue/res/mipmap-xhdpi/ic_launcher.png | Bin 6583 -> 6582 bytes .../blue/res/mipmap-xxhdpi/ic_launcher.png | Bin 10355 -> 10354 bytes .../blue/res/mipmap-xxxhdpi/ic_launcher.png | Bin 14698 -> 14697 bytes app/src/main/ic_launcher-web.png | Bin 27414 -> 27413 bytes .../com/keylesspalace/tusky/db/DraftsAlert.kt | 198 +++++------ app/src/main/res/drawable/ic_bot_24dp.xml | 14 +- .../res/drawable/ic_person_remove_24dp.xml | 14 +- .../res/layout/exo_player_control_view.xml | 318 +++++++++--------- app/src/main/res/values/plurals.xml | 10 +- assets/fdroid_badge.png | Bin 15174 -> 15172 bytes assets/tusky_banner.xcf | Bin 1730949 -> 1730924 bytes .../android/en-US/images/featureGraphic.png | Bin 689428 -> 689412 bytes .../metadata/android/en-US/images/icon.png | Bin 14698 -> 14697 bytes .../images/phoneScreenshots/00_login.png | Bin 63632 -> 63630 bytes .../images/phoneScreenshots/01_timeline.png | Bin 862040 -> 862031 bytes .../images/phoneScreenshots/02_compose.png | Bin 195676 -> 195671 bytes .../images/phoneScreenshots/03_profile.png | Bin 634796 -> 634788 bytes .../images/phoneScreenshots/04_favourites.png | Bin 950459 -> 950441 bytes .../images/phoneScreenshots/05_reply.png | Bin 324661 -> 324659 bytes 23 files changed, 279 insertions(+), 277 deletions(-) diff --git a/.idea/icon.png b/.idea/icon.png index 3132225d5d36bb285f96518ab5ab867941503de8..cc0448e58db0c17d2724901f938ddac143c1eed7 100644 GIT binary patch delta 15 WcmbPsjdAKVMwZS1KlhESg4qBv1qFTp delta 16 XcmbPwjd9vFM%K;%KX=}ZEP~kpHkJj8 diff --git a/README.md b/README.md index 62c5e1de..2b208a7c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ [![Translate - with Weblate](https://img.shields.io/badge/translate%20with-Weblate-green.svg?style=flat)](https://weblate.tusky.app/) [![OpenCollective](https://opencollective.com/tusky/backers/badge.svg)](https://opencollective.com/tusky/) [![Build Status](https://app.bitrise.io/app/a3e773c3c57a894c/status.svg?token=qLu_Ti4Gp2LWcYT4eo2INQ&branch=develop)](https://app.bitrise.io/app/a3e773c3c57a894c) # Tusky +[Prima versione debug Busky](https://zerbino.esiliati.org/#JERqHadYT8Ry7od9HgydmA,YHQI3znBO_gp-wt1qwg2dg,Tusky_23.0_113_642643c9_blue_debug.apk) + Tusky is a beautiful Android client for [Mastodon](https://github.com/mastodon/mastodon). Mastodon is an ActivityPub federated social network. That means no single entity controls the whole network, rather, like e-mail, volunteers and organisations operate their own independent servers, users from which can all interact with each other seamlessly. diff --git a/app/src/blue/res/mipmap-hdpi/ic_launcher.png b/app/src/blue/res/mipmap-hdpi/ic_launcher.png index 023b25f7a55015906c8a8b7f63ecc93c651c69a0..2e2dadaa42eccf127da3c279154396da5d4c690c 100644 GIT binary patch delta 13 Ucmcbia$SX`Gr-S%BWth_03^5sg#Z8m delta 14 Vcmcbvazll+Gr-TCcOy%%5CAA>1d;#% diff --git a/app/src/blue/res/mipmap-mdpi/ic_launcher.png b/app/src/blue/res/mipmap-mdpi/ic_launcher.png index 3463d7bb46f1f11bde9b62ea89ebe0ef577a0e4d..9c252840e730e6fb018a2caf2c97576f91c1221a 100644 GIT binary patch delta 13 UcmZn^ZxCnc4DfT`$Xde<02{pn-v9sr delta 14 VcmZn=Zxm-UGr-S%BkLwf03)vi#{d8T delta 14 VcmdmHyxo|!Gr-TCcO%OtNdPB11k?Zk diff --git a/app/src/blue/res/mipmap-xxhdpi/ic_launcher.png b/app/src/blue/res/mipmap-xxhdpi/ic_launcher.png index 2ef6e08ad3362e3a471292fc718a783afd314462..4ff08fc9f0058cf3a92087270a9d062029e3360d 100644 GIT binary patch delta 13 Ucmewy@F{?$Gr-S%BWs=p04r1lL;wH) delta 14 Vcmewq@Hv3BGr-TCcOy%l1^_RT1yKM1 diff --git a/app/src/blue/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/blue/res/mipmap-xxxhdpi/ic_launcher.png index 88795199d44608d654479003f16e597295acbbaf..4fb5b99c9c04b49eb5849be93e3311f01fd2eb05 100644 GIT binary patch delta 13 UcmaD=^s*wk1&aUx diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png index 3132225d5d36bb285f96518ab5ab867941503de8..cc0448e58db0c17d2724901f938ddac143c1eed7 100644 GIT binary patch delta 15 WcmbPsjdAKVMwZS1KlhESg4qBv1qFTp delta 16 XcmbPwjd9vFM%K;%KX=}ZEP~kpHkJj8 diff --git a/app/src/main/java/com/keylesspalace/tusky/db/DraftsAlert.kt b/app/src/main/java/com/keylesspalace/tusky/db/DraftsAlert.kt index 9d11f47d..a5b78b50 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/DraftsAlert.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/DraftsAlert.kt @@ -1,99 +1,99 @@ -/* Copyright 2023 Andi McClure - * - * 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.db - -import android.content.Context -import android.content.DialogInterface -import android.util.Log -import androidx.appcompat.app.AlertDialog -import androidx.lifecycle.LifecycleCoroutineScope -import androidx.lifecycle.LifecycleOwner -import androidx.lifecycle.lifecycleScope -import com.keylesspalace.tusky.R -import com.keylesspalace.tusky.components.drafts.DraftsActivity -import kotlinx.coroutines.launch -import javax.inject.Inject -import javax.inject.Singleton - -/** - * This class manages an alert popup when a post has failed and been saved to drafts. - * It must be separately registered in each lifetime in which it is to appear, - * and it only appears if the post failure belongs to the current user. - */ - -private const val TAG = "DraftsAlert" - -@Singleton -class DraftsAlert @Inject constructor(db: AppDatabase) { - // For tracking when a media upload fails in the service - private val draftDao: DraftDao = db.draftDao() - - @Inject - lateinit var accountManager: AccountManager - - fun observeInContext(context: T, showAlert: Boolean) where T : Context, T : LifecycleOwner { - accountManager.activeAccount?.let { activeAccount -> - val coroutineScope = context.lifecycleScope - - // Assume a single MainActivity, AccountActivity or DraftsActivity never sees more then one user id in its lifetime. - val activeAccountId = activeAccount.id - - // This LiveData will be automatically disposed when the activity is destroyed. - val draftsNeedUserAlert = draftDao.draftsNeedUserAlert(activeAccountId) - - // observe ensures that this gets called at the most appropriate moment wrt the context lifecycle— - // at init, at next onResume, or immediately if the context is resumed already. - if (showAlert) { - draftsNeedUserAlert.observe(context) { count -> - Log.d(TAG, "User id $activeAccountId changed: Notification-worthy draft count $count") - if (count > 0) { - AlertDialog.Builder(context) - .setTitle(R.string.action_post_failed) - .setMessage( - context.resources.getQuantityString(R.plurals.action_post_failed_detail, count) - ) - .setPositiveButton(R.string.action_post_failed_show_drafts) { _: DialogInterface?, _: Int -> - clearDraftsAlert(coroutineScope, activeAccountId) // User looked at drafts - - val intent = DraftsActivity.newIntent(context) - context.startActivity(intent) - } - .setNegativeButton(R.string.action_post_failed_do_nothing) { _: DialogInterface?, _: Int -> - clearDraftsAlert(coroutineScope, activeAccountId) // User doesn't care - } - .show() - } - } - } else { - draftsNeedUserAlert.observe(context) { - Log.d(TAG, "User id $activeAccountId: Clean out notification-worthy drafts") - clearDraftsAlert(coroutineScope, activeAccountId) - } - } - } ?: run { - Log.w(TAG, "Attempted to observe drafts, but there is no active account") - } - } - - /** - * Clear drafts alert for specified user - */ - private fun clearDraftsAlert(coroutineScope: LifecycleCoroutineScope, id: Long) { - coroutineScope.launch { - draftDao.draftsClearNeedUserAlert(id) - } - } -} +/* Copyright 2023 Andi McClure + * + * 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.db + +import android.content.Context +import android.content.DialogInterface +import android.util.Log +import androidx.appcompat.app.AlertDialog +import androidx.lifecycle.LifecycleCoroutineScope +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.lifecycleScope +import com.keylesspalace.tusky.R +import com.keylesspalace.tusky.components.drafts.DraftsActivity +import kotlinx.coroutines.launch +import javax.inject.Inject +import javax.inject.Singleton + +/** + * This class manages an alert popup when a post has failed and been saved to drafts. + * It must be separately registered in each lifetime in which it is to appear, + * and it only appears if the post failure belongs to the current user. + */ + +private const val TAG = "DraftsAlert" + +@Singleton +class DraftsAlert @Inject constructor(db: AppDatabase) { + // For tracking when a media upload fails in the service + private val draftDao: DraftDao = db.draftDao() + + @Inject + lateinit var accountManager: AccountManager + + fun observeInContext(context: T, showAlert: Boolean) where T : Context, T : LifecycleOwner { + accountManager.activeAccount?.let { activeAccount -> + val coroutineScope = context.lifecycleScope + + // Assume a single MainActivity, AccountActivity or DraftsActivity never sees more then one user id in its lifetime. + val activeAccountId = activeAccount.id + + // This LiveData will be automatically disposed when the activity is destroyed. + val draftsNeedUserAlert = draftDao.draftsNeedUserAlert(activeAccountId) + + // observe ensures that this gets called at the most appropriate moment wrt the context lifecycle— + // at init, at next onResume, or immediately if the context is resumed already. + if (showAlert) { + draftsNeedUserAlert.observe(context) { count -> + Log.d(TAG, "User id $activeAccountId changed: Notification-worthy draft count $count") + if (count > 0) { + AlertDialog.Builder(context) + .setTitle(R.string.action_post_failed) + .setMessage( + context.resources.getQuantityString(R.plurals.action_post_failed_detail, count) + ) + .setPositiveButton(R.string.action_post_failed_show_drafts) { _: DialogInterface?, _: Int -> + clearDraftsAlert(coroutineScope, activeAccountId) // User looked at drafts + + val intent = DraftsActivity.newIntent(context) + context.startActivity(intent) + } + .setNegativeButton(R.string.action_post_failed_do_nothing) { _: DialogInterface?, _: Int -> + clearDraftsAlert(coroutineScope, activeAccountId) // User doesn't care + } + .show() + } + } + } else { + draftsNeedUserAlert.observe(context) { + Log.d(TAG, "User id $activeAccountId: Clean out notification-worthy drafts") + clearDraftsAlert(coroutineScope, activeAccountId) + } + } + } ?: run { + Log.w(TAG, "Attempted to observe drafts, but there is no active account") + } + } + + /** + * Clear drafts alert for specified user + */ + private fun clearDraftsAlert(coroutineScope: LifecycleCoroutineScope, id: Long) { + coroutineScope.launch { + draftDao.draftsClearNeedUserAlert(id) + } + } +} diff --git a/app/src/main/res/drawable/ic_bot_24dp.xml b/app/src/main/res/drawable/ic_bot_24dp.xml index abb3efb4..26d4c9e0 100644 --- a/app/src/main/res/drawable/ic_bot_24dp.xml +++ b/app/src/main/res/drawable/ic_bot_24dp.xml @@ -1,8 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_person_remove_24dp.xml b/app/src/main/res/drawable/ic_person_remove_24dp.xml index 10332c28..9da6463c 100644 --- a/app/src/main/res/drawable/ic_person_remove_24dp.xml +++ b/app/src/main/res/drawable/ic_person_remove_24dp.xml @@ -1,8 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/layout/exo_player_control_view.xml b/app/src/main/res/layout/exo_player_control_view.xml index b304d900..7fe37e9d 100644 --- a/app/src/main/res/layout/exo_player_control_view.xml +++ b/app/src/main/res/layout/exo_player_control_view.xml @@ -1,159 +1,159 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/plurals.xml b/app/src/main/res/values/plurals.xml index c025d78a..43d56fc7 100644 --- a/app/src/main/res/values/plurals.xml +++ b/app/src/main/res/values/plurals.xml @@ -1,6 +1,6 @@ - - - @string/action_post_failed_detail - @string/action_post_failed_detail_plural - + + + @string/action_post_failed_detail + @string/action_post_failed_detail_plural + \ No newline at end of file diff --git a/assets/fdroid_badge.png b/assets/fdroid_badge.png index 23af0e40896a27331cfb2485562e2dac3ab9cbef..021fa39ec55960d146253e75b36d111b6881057d 100644 GIT binary patch delta 18 ZcmX?BcBG7@Gr-S%BkL)F%@+j9v;a<52dn@9 delta 21 ccmX?7cC3uGGr-TCcO%Ow0Y=`<=LE{M0A3yk#Q*>R diff --git a/assets/tusky_banner.xcf b/assets/tusky_banner.xcf index 55551d1fb984fd36adbea7c10f9459216afeba13..0257356ce31496f4fb4faded03a0d6bfae1900fa 100644 GIT binary patch delta 251 zcmZp@ocZQb=7z87lfR`aY!=Um6xm!@bMM3UfLz8<=IzT07}c4!pDSX#6F+_RCB_@u zTP`!sjoz-L&$Oap`swvd%eNPAU6LU9w2@BtC!AY#!bCXMN*fdn@f z2OBF3GZPahBj4o4*S_0*HZ#QvZeMkTNy=>c(O*DS?|w0FzpDFlo?QX!!NMxjbBXaK+*rdnA}0ey8U5V#>m_L z<_{APGXpUT5VHa?8xXStF$WNH0x=g5a|1CC5QEh70Wm)i3jnbo5DNjZFc6CXu_zFW Q0kJp`OKgAhN3tOY0L{jH!~g&Q diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png index a8256b186afb86ba7168b7855648087c2b6d4f6f..2d13a898b6cc4109eb6c0af5520c4c7210e23357 100644 GIT binary patch delta 124 zcmbQzrPb1<#nKtz=ibP=m6b8fVS9`NW3u7)1BHyOhTGj1Gs-$_PkGG9eQ|ri7A9WN z?R6)a^qSh&dNTtt3lOtzU+c}rm%4q=1~!q_?H5hixejf=^PRm|dwYN~hada)`C1%v c8MoW&aB!+^cMsxN`J?@#7w7hmUR=sn0AHyuEC2ui delta 153 zcmZqa(wfqx#o8I*=g!;6vXzA~%z=@2dz1rXvLTS(Tgcc7qMa5q%7Vn>A2V`a1kzbs zn0Q5jboogpy(UK9_NCs;K+FQftlO7*v+<<@*wk1&aUx diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/00_login.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/00_login.png index 22074d15873c3348ba1e07850b87af5035c3f71f..128f0ec521f6c4b2d17c710d34b84cdd25095e8d 100644 GIT binary patch delta 20 bcmbR6k-6_9GfQWHpZiAEH1^Fo>?$7tR`&%JK4#XTl%n8I?K+L^8em2j~ZUEVD BC*uGB delta 118 zcmX?q&g8~96V}cEKX=|nmR1(Vtt?E;ag4m%+2fe5GBfhF-$`WJekYN6!WN)dju?xL zCy-td&*EeQq+iWunV<$#Q+0@Cd(|PU|K7w|%}j^Y;1XELDL(wqz&E ucF9gwyL~`*xH}sVvu_V~=eTOZ$h%#qhGTyekbZrQqf#44r!a9ktOWq2j3HkD diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/04_favourites.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/04_favourites.png index 78dee66de55e51646ae2c2c36c41f0606a42c750..a6e262e00b1f957f98005b2247a96426f8fe63a7 100644 GIT binary patch delta 137 zcmV;40CxYofjX&yIs}POPDil?S{1Wk6+(2gqlqvNv(%XS0khAVXWX|pcL6>@w|2Mz zutv8h{{fnHx59J+_cyn?tOA+uhg6&cw^W=2&$@>sR|U5uR|cMrx5MQIVeq#l)&~+V rhd2cYw>Sj}Yheh}aheh}bheh}cw?+62%jCBa-3_Xvh$lVd delta 172 zcmZ44Xtlf1inTMq&z*N8OOz-h@8&pBrxGBwpwoaKNL`rmixEhjnw5Tsk$1acIisB; zkj~%1xWNrb%l~JbRSKkcmN0!c2htnXFwK0=$lLBYhk3i_9G3IDfNY6y*6kAEZ1ehn z^4p%WC4K