From cf2528390e960f79f7332bd73399043dd7671937 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:03:46 +0300 Subject: [PATCH 1/7] Fix list numbering --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79a67009..506ca3a9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ cd tremotesf-android git submodule update --init ``` 2. Download and install latest Android Studio. -5. Build APK in Android Studio. +3. Build APK in Android Studio. ## Translations Translations are managed on [Transifex](https://www.transifex.com/equeim/tremotesf-android). From c61ce89d48f9a1e837ff7445e9a923166a29693c Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:07:12 +0300 Subject: [PATCH 2/7] Remove unused optin --- .../kotlin/org/equeim/tremotesf/torrentfile/TestDispatchers.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/torrentfile/src/test/kotlin/org/equeim/tremotesf/torrentfile/TestDispatchers.kt b/torrentfile/src/test/kotlin/org/equeim/tremotesf/torrentfile/TestDispatchers.kt index 3c55d008..adeebe23 100644 --- a/torrentfile/src/test/kotlin/org/equeim/tremotesf/torrentfile/TestDispatchers.kt +++ b/torrentfile/src/test/kotlin/org/equeim/tremotesf/torrentfile/TestDispatchers.kt @@ -4,11 +4,9 @@ package org.equeim.tremotesf.torrentfile -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.TestDispatcher import org.equeim.tremotesf.common.TremotesfDispatchers -@OptIn(ExperimentalCoroutinesApi::class) class TestDispatchers(dispatcher: TestDispatcher) : TremotesfDispatchers { override val Default = dispatcher override val IO = dispatcher From 33b12ebac9913430f3c8d5ab1241365d437d7226 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:12:36 +0300 Subject: [PATCH 3/7] Remove unused return value --- .../ui/connectionsettingsfragment/ServerEditFragment.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/kotlin/org/equeim/tremotesf/ui/connectionsettingsfragment/ServerEditFragment.kt b/app/src/main/kotlin/org/equeim/tremotesf/ui/connectionsettingsfragment/ServerEditFragment.kt index cb7e85ef..5b4c5a4a 100644 --- a/app/src/main/kotlin/org/equeim/tremotesf/ui/connectionsettingsfragment/ServerEditFragment.kt +++ b/app/src/main/kotlin/org/equeim/tremotesf/ui/connectionsettingsfragment/ServerEditFragment.kt @@ -261,7 +261,7 @@ class ServerEditFragment : NavigationFragment(R.layout.server_edit_fragment, 0) } } - private fun onDone(): Boolean { + private fun onDone() { with(binding) { val emptyFieldError = getText(R.string.empty_field_error) nameEdit.checkLength(emptyFieldError) @@ -289,8 +289,6 @@ class ServerEditFragment : NavigationFragment(R.layout.server_edit_fragment, 0) } } } - - return true } fun save() { From b06e7af8cb0c6497431ed78f61fcad7407c69eac Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:13:43 +0300 Subject: [PATCH 4/7] Remove unnecessary suppression --- .../kotlin/org/equeim/tremotesf/torrentfile/TorrentFileParser.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/torrentfile/src/main/kotlin/org/equeim/tremotesf/torrentfile/TorrentFileParser.kt b/torrentfile/src/main/kotlin/org/equeim/tremotesf/torrentfile/TorrentFileParser.kt index 0e269e01..4cf9e701 100644 --- a/torrentfile/src/main/kotlin/org/equeim/tremotesf/torrentfile/TorrentFileParser.kt +++ b/torrentfile/src/main/kotlin/org/equeim/tremotesf/torrentfile/TorrentFileParser.kt @@ -56,7 +56,6 @@ object TorrentFileParser { dispatchers: TremotesfDispatchers = DefaultTremotesfDispatchers, ): TorrentParseResult = withContext(dispatchers.IO) { - @Suppress("BlockingMethodInNonBlockingContext") if (inputStream.available() > MAX_FILE_SIZE) { Timber.e("File is too large") throw FileIsTooLargeException() From 3d5baa085694b5c9ba7e98e9ee869bae39ddbf74 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:19:23 +0300 Subject: [PATCH 5/7] Fix incorrect strings being used Also use free_space_error again. --- .../equeim/tremotesf/ui/addtorrent/AddTorrentFileFragment.kt | 2 +- .../TorrentPropertiesFragmentViewModel.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/org/equeim/tremotesf/ui/addtorrent/AddTorrentFileFragment.kt b/app/src/main/kotlin/org/equeim/tremotesf/ui/addtorrent/AddTorrentFileFragment.kt index e2f3f281..37f1f854 100644 --- a/app/src/main/kotlin/org/equeim/tremotesf/ui/addtorrent/AddTorrentFileFragment.kt +++ b/app/src/main/kotlin/org/equeim/tremotesf/ui/addtorrent/AddTorrentFileFragment.kt @@ -341,7 +341,7 @@ class AddTorrentFileFragment : AddTorrentFragment( R.string.free_space, FormatUtils.formatFileSize(requireContext(), it) ) - } + } ?: getText(R.string.free_space_error) freeSpaceJob = null } } diff --git a/app/src/main/kotlin/org/equeim/tremotesf/ui/torrentpropertiesfragment/TorrentPropertiesFragmentViewModel.kt b/app/src/main/kotlin/org/equeim/tremotesf/ui/torrentpropertiesfragment/TorrentPropertiesFragmentViewModel.kt index 41564115..74b234ca 100644 --- a/app/src/main/kotlin/org/equeim/tremotesf/ui/torrentpropertiesfragment/TorrentPropertiesFragmentViewModel.kt +++ b/app/src/main/kotlin/org/equeim/tremotesf/ui/torrentpropertiesfragment/TorrentPropertiesFragmentViewModel.kt @@ -84,14 +84,14 @@ class TorrentPropertiesFragmentViewModel( fun pauseTorrent(torrentId: Int) { viewModelScope.launch { val ok = - GlobalRpcClient.awaitBackgroundRpcRequest(R.string.torrents_start_error) { stopTorrents(listOf(torrentId)) } + GlobalRpcClient.awaitBackgroundRpcRequest(R.string.torrents_pause_error) { stopTorrents(listOf(torrentId)) } if (ok) refreshRequests.emit(Unit) } } fun checkTorrent(torrentId: Int) { viewModelScope.launch { - val ok = GlobalRpcClient.awaitBackgroundRpcRequest(R.string.torrents_start_error) { + val ok = GlobalRpcClient.awaitBackgroundRpcRequest(R.string.torrents_check_error) { verifyTorrents( listOf(torrentId) ) From 2b33ce5f2cb0806567c579f2db02bf704e082411 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:20:14 +0300 Subject: [PATCH 6/7] Remove unused resources --- .../main/res/color/elevation_overlay_color_4dp.xml | 11 ----------- app/src/main/res/values-de-rDE/strings.xml | 3 --- app/src/main/res/values-en/strings.xml | 4 ---- app/src/main/res/values-es/strings.xml | 3 --- app/src/main/res/values-fr/strings.xml | 3 --- app/src/main/res/values-it/strings.xml | 3 --- app/src/main/res/values-ko-rKR/strings.xml | 3 --- app/src/main/res/values-nl-rBE/strings.xml | 3 --- app/src/main/res/values-nl/strings.xml | 3 --- app/src/main/res/values-pt-rBR/strings.xml | 3 --- app/src/main/res/values-ru/strings.xml | 3 --- app/src/main/res/values-tr/strings.xml | 3 --- app/src/main/res/values-vi-rVN/strings.xml | 2 -- app/src/main/res/values-zh-rCN/strings.xml | 3 --- app/src/main/res/values/strings.xml | 4 ---- app/src/main/res/values/styles.xml | 4 ---- 16 files changed, 58 deletions(-) delete mode 100644 app/src/main/res/color/elevation_overlay_color_4dp.xml diff --git a/app/src/main/res/color/elevation_overlay_color_4dp.xml b/app/src/main/res/color/elevation_overlay_color_4dp.xml deleted file mode 100644 index baeade70..00000000 --- a/app/src/main/res/color/elevation_overlay_color_4dp.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 68e1e245..cd5f8e73 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Verbindung getrennt Verbinden\u2026 - Verbunden Verbinden Verbindung trennen @@ -96,7 +95,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent hinzugefügt Torrent nicht gefunden - Torrent entfernt Details Dateien @@ -159,7 +157,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Keine Tracker - Fehler Geschwindigkeit Beachte globale Beschränkungen diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index dd0017a0..5832fa15 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Disconnected Connecting\u2026 - Connected Connect Disconnect @@ -81,7 +80,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent finished Torrent not found - Torrent removed Details Files @@ -134,8 +132,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Loading\u2026 No peers - Error - Speed Honor global limits Download diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e82968ec..b3551157 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Desconectado Conectando… - Conectado Conectar Desconectar @@ -102,7 +101,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent añadido Torrent no encontrado - Torrent eliminado Detalles Archivos @@ -165,7 +163,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Sin trackers - Error Velocidad Respetar límites globales diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 858cf982..2ab40a08 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Déconnecté Connexion\u2026 - Connecté Se connecter Se déconnecter @@ -96,7 +95,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent ajouté Torrent non trouvé - Torrent supprimé Détails Fichiers @@ -159,7 +157,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Aucun traqueur - Erreur Vitesse Respecter les limites globales diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 51bd96fb..f3627cb6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Disconnesso In connessione\n2026 - Connesso Connetti Disconnetti @@ -92,7 +91,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent aggiunto Torrent non trovato - Torrent rimosso Dettagli File @@ -149,7 +147,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Nessun server traccia - Errore Velocità Segui i limiti globali diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index eb67b0a6..44c8c930 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 연결 해제 연결\u2026 - 연결됨 연결 연결 해제 @@ -90,7 +89,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 토렌트 추가 토렌트를 찾을 수 없음 - 토렌트 제거 세부 정보 파일 @@ -153,7 +151,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 트래커 없음 - 오류 속도 전역 제한 준수 diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index f79b5ea5..a6072b3c 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Verbinding verbroken Verbinden\u2026 - Verbonden Verbinden Verbinding verbreken @@ -77,7 +76,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent toegevoegd Torrent niet gevonden - Torrent verwijderd Details Bestanden @@ -132,7 +130,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Laden\u2026 Geen peers - Fout Snelheid Algemene limieten aanhouden diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1854896c..da6c0b5c 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Verbinding verbroken Verbinden\u2026 - Verbonden Verbinden Verbinding verbreken @@ -77,7 +76,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent toegevoegd Torrent niet gevonden - Torrent verwijderd Details Bestanden @@ -132,7 +130,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Laden\u2026 Geen peers - Fout Snelheid Algemene limieten aanhouden diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 49459936..d3b84045 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Desconectado Conectando\u2026 - Conectado Conectar Desconectar @@ -88,7 +87,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent adicionado Torrent não encontrado - Torrent removido Detalhes Arquivos @@ -142,7 +140,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Sem rastreadores - Erro Velocidade Honrar limites globais diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index fc9af034..d46161ff 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Отключено Подключение… - Подключено Подключиться Отключиться @@ -108,7 +107,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Торрент добавлен Торрент не найден - Торрент удален Сведения Файлы @@ -171,7 +169,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Нет трекеров - Ошибка Скорость Учитывать глобальные ограничения diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index b474f37c..8b52f394 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Bağlantı kesildi Bağlanıyor\u2026 - Bağlandı Bağlan Bağlantıyı kes @@ -80,7 +79,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent eklendi Torrent bulunamadı - Torrent kaldırıldı Ayrıntılar Dosyalar @@ -137,7 +135,6 @@ SPDX-License-Identifier: GPL-3.0-or-later İzleyici yok - Hata Hız Evrensel saygınlık sınırları diff --git a/app/src/main/res/values-vi-rVN/strings.xml b/app/src/main/res/values-vi-rVN/strings.xml index 3cbd5a85..f8617d32 100644 --- a/app/src/main/res/values-vi-rVN/strings.xml +++ b/app/src/main/res/values-vi-rVN/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Ngắt kết nối Đang kết nối\u2026 - Đã kết nối Kết nối Ngắt kết nối @@ -88,7 +87,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Không có tracker - Lỗi Tốc độ Theo các giới hạn chung diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 32cc7b33..e90b220f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 已断开 正在连接\u2026 - 已连接 连接 断开 @@ -84,7 +83,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 种子已添加 找不到种子 - 种子已移除 详细信息 文件 @@ -147,7 +145,6 @@ SPDX-License-Identifier: GPL-3.0-or-later 无跟踪服务器 - 错误 速度 以全局设置为准 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eabfae33..20da1c88 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -12,7 +12,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Disconnected Connecting\u2026 - Connected Connect Disconnect @@ -101,7 +100,6 @@ SPDX-License-Identifier: GPL-3.0-or-later Torrent added Torrent not found - Torrent removed Details Files @@ -164,8 +162,6 @@ SPDX-License-Identifier: GPL-3.0-or-later No trackers - Error - Speed Honor global limits Download diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 45e2c3e3..cfc96abd 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -113,10 +113,6 @@ SPDX-License-Identifier: GPL-3.0-or-later ?android:attr/textColorHint - - From 6980cb26cc018e9f01b5a5b28a754f9dd64d7616 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Thu, 30 May 2024 23:30:30 +0300 Subject: [PATCH 7/7] Silence lint error --- app/src/main/kotlin/org/equeim/tremotesf/ui/AboutFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/equeim/tremotesf/ui/AboutFragment.kt b/app/src/main/kotlin/org/equeim/tremotesf/ui/AboutFragment.kt index b303b4ff..c7a63144 100644 --- a/app/src/main/kotlin/org/equeim/tremotesf/ui/AboutFragment.kt +++ b/app/src/main/kotlin/org/equeim/tremotesf/ui/AboutFragment.kt @@ -24,7 +24,7 @@ class AboutFragment : NavigationFragment(R.layout.about_fragment) { override fun onViewStateRestored(savedInstanceState: Bundle?) { super.onViewStateRestored(savedInstanceState) - toolbar.title = "%s %s".format(getString(R.string.app_name), BuildConfig.VERSION_NAME) + toolbar.title = "${getString(R.string.app_name)} ${BuildConfig.VERSION_NAME}" pagerAdapter = PagerAdapter(this)