Changed periodic sync icons

This commit is contained in:
M66B 2023-01-18 07:56:04 +01:00
parent eb6a91ccaf
commit 936c71bb2c
1 changed files with 11 additions and 13 deletions

View File

@ -276,8 +276,13 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivState.setImageResource(R.drawable.twotone_cancel_24);
ivState.setContentDescription(context.getString(R.string.title_legend_closing));
} else if (folder.state == null) {
ivState.setImageResource(R.drawable.twotone_cloud_off_24);
ivState.setContentDescription(context.getString(R.string.title_legend_disconnected));
if (folder.poll) {
ivState.setImageResource(R.drawable.twotone_hourglass_top_24);
ivState.setContentDescription(context.getString(R.string.title_legend_synchronize_poll));
} else {
ivState.setImageResource(R.drawable.twotone_cloud_off_24);
ivState.setContentDescription(context.getString(R.string.title_legend_disconnected));
}
} else
ivState.setImageResource(R.drawable.twotone_warning_24);
} else {
@ -396,17 +401,10 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
a.append(NF.format(folder.keep_days));
tvAfter.setText(a.toString());
if (folder.synchronize) {
ibSync.setImageResource(folder.poll
? R.drawable.twotone_hourglass_top_24
: R.drawable.twotone_sync_24);
ibSync.setContentDescription(context.getString(folder.poll
? R.string.title_legend_synchronize_poll
: R.string.title_legend_synchronize_on));
} else {
ibSync.setImageResource(R.drawable.twotone_sync_disabled_24);
ibSync.setContentDescription(context.getString(R.string.title_legend_synchronize_off));
}
ibSync.setImageResource(folder.synchronize
? R.drawable.twotone_sync_24 : R.drawable.twotone_sync_disabled_24);
ibSync.setContentDescription(context.getString(folder.synchronize
? R.string.title_legend_synchronize_on : R.string.title_legend_synchronize_off));
}
ibSync.setImageTintList(ColorStateList.valueOf(
folder.synchronize && folder.initialize != 0 &&