Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint fixes #306

Merged
merged 7 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class AddTorrentFileFragment : AddTorrentFragment(
R.string.free_space,
FormatUtils.formatFileSize(requireContext(), it)
)
}
} ?: getText(R.string.free_space_error)
freeSpaceJob = null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -289,8 +289,6 @@ class ServerEditFragment : NavigationFragment(R.layout.server_edit_fragment, 0)
}
}
}

return true
}

fun save() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/color/elevation_overlay_color_4dp.xml

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Verbindung getrennt</string>
<string name="connecting">Verbinden\u2026</string>
<string name="connected">Verbunden</string>

<string name="connect">Verbinden</string>
<string name="disconnect">Verbindung trennen</string>
Expand Down Expand Up @@ -96,7 +95,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent hinzugefügt</string>

<string name="torrent_not_found">Torrent nicht gefunden</string>
<string name="torrent_removed">Torrent entfernt</string>

<string name="details">Details</string>
<string name="files">Dateien</string>
Expand Down Expand Up @@ -159,7 +157,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Keine Tracker</string>

<string name="error">Fehler</string>

<string name="speed">Geschwindigkeit</string>
<string name="honor_global_limits">Beachte globale Beschränkungen</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources>
<string name="disconnected">Disconnected</string>
<string name="connecting">Connecting\u2026</string>
<string name="connected">Connected</string>

<string name="connect">Connect</string>
<string name="disconnect">Disconnect</string>
Expand Down Expand Up @@ -81,7 +80,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_finished">Torrent finished</string>

<string name="torrent_not_found">Torrent not found</string>
<string name="torrent_removed">Torrent removed</string>

<string name="details">Details</string>
<string name="files">Files</string>
Expand Down Expand Up @@ -134,8 +132,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="loading">Loading\u2026</string>
<string name="no_peers">No peers</string>

<string name="error">Error</string>

<string name="speed">Speed</string>
<string name="honor_global_limits">Honor global limits</string>
<string name="download_noun">Download</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Desconectado</string>
<string name="connecting">Conectando…</string>
<string name="connected">Conectado</string>

<string name="connect">Conectar</string>
<string name="disconnect">Desconectar</string>
Expand Down Expand Up @@ -102,7 +101,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent añadido</string>

<string name="torrent_not_found">Torrent no encontrado</string>
<string name="torrent_removed">Torrent eliminado</string>

<string name="details">Detalles</string>
<string name="files">Archivos</string>
Expand Down Expand Up @@ -165,7 +163,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Sin trackers</string>

<string name="error">Error</string>

<string name="speed">Velocidad</string>
<string name="honor_global_limits">Respetar límites globales</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Déconnecté</string>
<string name="connecting">Connexion\u2026</string>
<string name="connected">Connecté</string>

<string name="connect">Se connecter</string>
<string name="disconnect">Se déconnecter</string>
Expand Down Expand Up @@ -96,7 +95,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent ajouté</string>

<string name="torrent_not_found">Torrent non trouvé</string>
<string name="torrent_removed">Torrent supprimé</string>

<string name="details">Détails</string>
<string name="files">Fichiers</string>
Expand Down Expand Up @@ -159,7 +157,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Aucun traqueur</string>

<string name="error">Erreur</string>

<string name="speed">Vitesse</string>
<string name="honor_global_limits">Respecter les limites globales</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Disconnesso</string>
<string name="connecting">In connessione\n2026</string>
<string name="connected">Connesso</string>

<string name="connect">Connetti</string>
<string name="disconnect">Disconnetti</string>
Expand Down Expand Up @@ -92,7 +91,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent aggiunto</string>

<string name="torrent_not_found">Torrent non trovato</string>
<string name="torrent_removed">Torrent rimosso</string>

<string name="details">Dettagli</string>
<string name="files">File</string>
Expand Down Expand Up @@ -149,7 +147,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Nessun server traccia</string>

<string name="error">Errore</string>

<string name="speed">Velocità</string>
<string name="honor_global_limits">Segui i limiti globali</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">연결 해제</string>
<string name="connecting">연결\u2026</string>
<string name="connected">연결됨</string>

<string name="connect">연결</string>
<string name="disconnect">연결 해제</string>
Expand Down Expand Up @@ -90,7 +89,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">토렌트 추가</string>

<string name="torrent_not_found">토렌트를 찾을 수 없음</string>
<string name="torrent_removed">토렌트 제거</string>

<string name="details">세부 정보</string>
<string name="files">파일</string>
Expand Down Expand Up @@ -153,7 +151,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">트래커 없음</string>

<string name="error">오류</string>

<string name="speed">속도</string>
<string name="honor_global_limits">전역 제한 준수</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-nl-rBE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Verbinding verbroken</string>
<string name="connecting">Verbinden\u2026</string>
<string name="connected">Verbonden</string>

<string name="connect">Verbinden</string>
<string name="disconnect">Verbinding verbreken</string>
Expand Down Expand Up @@ -77,7 +76,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent toegevoegd</string>

<string name="torrent_not_found">Torrent niet gevonden</string>
<string name="torrent_removed">Torrent verwijderd</string>

<string name="details">Details</string>
<string name="files">Bestanden</string>
Expand Down Expand Up @@ -132,7 +130,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="loading">Laden\u2026</string>
<string name="no_peers">Geen peers</string>

<string name="error">Fout</string>

<string name="speed">Snelheid</string>
<string name="honor_global_limits">Algemene limieten aanhouden</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Verbinding verbroken</string>
<string name="connecting">Verbinden\u2026</string>
<string name="connected">Verbonden</string>

<string name="connect">Verbinden</string>
<string name="disconnect">Verbinding verbreken</string>
Expand Down Expand Up @@ -77,7 +76,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent toegevoegd</string>

<string name="torrent_not_found">Torrent niet gevonden</string>
<string name="torrent_removed">Torrent verwijderd</string>

<string name="details">Details</string>
<string name="files">Bestanden</string>
Expand Down Expand Up @@ -132,7 +130,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="loading">Laden\u2026</string>
<string name="no_peers">Geen peers</string>

<string name="error">Fout</string>

<string name="speed">Snelheid</string>
<string name="honor_global_limits">Algemene limieten aanhouden</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Desconectado</string>
<string name="connecting">Conectando\u2026</string>
<string name="connected">Conectado</string>

<string name="connect">Conectar</string>
<string name="disconnect">Desconectar</string>
Expand Down Expand Up @@ -88,7 +87,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent adicionado</string>

<string name="torrent_not_found">Torrent não encontrado</string>
<string name="torrent_removed">Torrent removido</string>

<string name="details">Detalhes</string>
<string name="files">Arquivos</string>
Expand Down Expand Up @@ -142,7 +140,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Sem rastreadores</string>

<string name="error">Erro</string>

<string name="speed">Velocidade</string>
<string name="honor_global_limits">Honrar limites globais</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Отключено</string>
<string name="connecting">Подключение…</string>
<string name="connected">Подключено</string>

<string name="connect">Подключиться</string>
<string name="disconnect">Отключиться</string>
Expand Down Expand Up @@ -108,7 +107,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Торрент добавлен</string>

<string name="torrent_not_found">Торрент не найден</string>
<string name="torrent_removed">Торрент удален</string>

<string name="details">Сведения</string>
<string name="files">Файлы</string>
Expand Down Expand Up @@ -171,7 +169,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Нет трекеров</string>

<string name="error">Ошибка</string>

<string name="speed">Скорость</string>
<string name="honor_global_limits">Учитывать глобальные ограничения</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Bağlantı kesildi</string>
<string name="connecting">Bağlanıyor\u2026</string>
<string name="connected">Bağlandı</string>

<string name="connect">Bağlan</string>
<string name="disconnect">Bağlantıyı kes</string>
Expand Down Expand Up @@ -80,7 +79,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">Torrent eklendi</string>

<string name="torrent_not_found">Torrent bulunamadı</string>
<string name="torrent_removed">Torrent kaldırıldı</string>

<string name="details">Ayrıntılar</string>
<string name="files">Dosyalar</string>
Expand Down Expand Up @@ -137,7 +135,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">İzleyici yok</string>

<string name="error">Hata</string>

<string name="speed">Hız</string>
<string name="honor_global_limits">Evrensel saygınlık sınırları</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-vi-rVN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">Ngắt kết nối</string>
<string name="connecting">Đang kết nối\u2026</string>
<string name="connected">Đã kết nối</string>

<string name="connect">Kết nối</string>
<string name="disconnect">Ngắt kết nối</string>
Expand Down Expand Up @@ -88,7 +87,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">Không có tracker</string>

<string name="error">Lỗi</string>

<string name="speed">Tốc độ</string>
<string name="honor_global_limits">Theo các giới hạn chung</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="disconnected">已断开</string>
<string name="connecting">正在连接\u2026</string>
<string name="connected">已连接</string>

<string name="connect">连接</string>
<string name="disconnect">断开</string>
Expand Down Expand Up @@ -84,7 +83,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string name="torrent_added">种子已添加</string>

<string name="torrent_not_found">找不到种子</string>
<string name="torrent_removed">种子已移除</string>

<string name="details">详细信息</string>
<string name="files">文件</string>
Expand Down Expand Up @@ -147,7 +145,6 @@ SPDX-License-Identifier: GPL-3.0-or-later

<string name="no_trackers">无跟踪服务器</string>

<string name="error">错误</string>

<string name="speed">速度</string>
<string name="honor_global_limits">以全局设置为准</string>
Expand Down
Loading