Skip to content

Commit

Permalink
Add "folder is unshared" status label (fixes #347) (#351)
Browse files Browse the repository at this point in the history
* res/colors: Add text_orange

* strings: Add state_unshared

* Imported de translation

* Add "folder is unshared" status label (fixes #347)
  • Loading branch information
Catfriend1 authored Mar 5, 2019
1 parent ce213b9 commit 9ab2f28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ private void updateFolderStatusView(ItemFolderListBinding binding, Folder folder
} else {
switch(folderStatus.state) {
case "idle":
binding.state.setText(mContext.getString(R.string.state_idle));
binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_green));
if (folder.getDeviceCount() <= 1) {
// Special case: The folder is IDLE and UNSHARED.
binding.state.setText(mContext.getString(R.string.state_unshared));
binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_orange));
} else {
binding.state.setText(mContext.getString(R.string.state_idle));
binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_green));
}
break;
case "scanning":
binding.state.setText(mContext.getString(R.string.state_scanning));
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ Bitte melden Sie auftretende Probleme via GitHub.</string>
<string name="state_unknown">Unbekannt</string>
<string name="state_paused">Pausiert</string>
<string name="status_outofsync">Nicht synchronisiert</string>
<string name="state_unshared">Ungeteilt</string>

<!-- Format string for folder size, eg "500 MiB / 1 GiB" -->
<string name="folder_size_format">%1$s / %2$s</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<color name="text_red">#ffff4444</color>
<color name="text_blue">#ff33b5e5</color>
<color name="text_green">#ff99cc00</color>
<color name="text_orange">#f57c00</color>
<color name="light_grey">#cccccc</color>

<!-- FirstStartActivity welcome wizard start -->
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ Please report any problems you encounter via Github.</string>
<string name="state_unknown">Unknown</string>
<string name="state_paused">Paused</string>
<string name="status_outofsync">Out of Sync</string>
<string name="state_unshared">Unshared</string>

<!-- Format string for folder size, eg "500 MiB / 1 GiB" -->
<string name="folder_size_format">%1$s / %2$s</string>
Expand Down

0 comments on commit 9ab2f28

Please sign in to comment.