From 044404e9f0db27a365a72cb53ccb711cedbb7717 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Wed, 6 Mar 2019 01:09:49 +0100 Subject: [PATCH] Fix lint --- .../syncthingandroid/views/FoldersAdapter.java | 13 +++++-------- app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java b/app/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java index 21d01935..92b2a055 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java @@ -130,14 +130,11 @@ public class FoldersAdapter extends ArrayAdapter { binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_blue)); break; case "error": - binding.state.setText( - mContext.getString( - R.string.state_error) + - (!TextUtils.isEmpty(folderStatus.error) - ? " (" + folderStatus.error + ")" - : "" - ) - ); + if (TextUtils.isEmpty(folderStatus.error)) { + binding.state.setText(mContext.getString(R.string.state_error)); + } else { + binding.state.setText(mContext.getString(R.string.state_error_message, folderStatus.error)); + } binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_red)); break; case "unknown": diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 406583a1..32b5cc21 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -837,6 +837,7 @@ Bitte melden Sie auftretende Probleme via GitHub. Synchronisiere Synchronisiere (%1$d%%) Fehler + Fehler (%1$s) Unbekannt Pausiert Nicht synchronisiert diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c236a819..d4ec8501 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -858,6 +858,7 @@ Please report any problems you encounter via Github. Syncing Syncing (%1$d%%) Error + Error (%1$s) Unknown Paused Out of Sync