1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Show syncing/downloading in navigation menu

This commit is contained in:
M66B 2019-05-01 09:31:40 +02:00
parent 384e93c47e
commit 85f4f5b958

View file

@ -75,12 +75,22 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
private void bindTo(TupleFolderNav folder) { private void bindTo(TupleFolderNav folder) {
if (EntityFolder.OUTBOX.equals(folder.type)) { if (EntityFolder.OUTBOX.equals(folder.type)) {
ivItem.setImageResource(R.drawable.baseline_send_24); if ("syncing".equals(folder.sync_state))
ivItem.setImageResource(R.drawable.baseline_compare_arrows_24);
else
ivItem.setImageResource(R.drawable.baseline_send_24);
ivItem.clearColorFilter(); ivItem.clearColorFilter();
} else { } else {
ivItem.setImageResource("connected".equals(folder.state) if ("syncing".equals(folder.sync_state))
? R.drawable.baseline_folder_24 ivItem.setImageResource(R.drawable.baseline_compare_arrows_24);
: R.drawable.baseline_folder_open_24); else if ("downloading".equals(folder.sync_state))
ivItem.setImageResource(R.drawable.baseline_cloud_download_24);
else
ivItem.setImageResource("connected".equals(folder.state)
? R.drawable.baseline_folder_24
: R.drawable.baseline_folder_open_24);
if (folder.color == null) if (folder.color == null)
ivItem.clearColorFilter(); ivItem.clearColorFilter();
else else