|
|
|
@ -7293,19 +7293,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
this.name = folder.name;
|
|
|
|
|
this.display = folder.getDisplayName(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean equals(Object other) {
|
|
|
|
|
if (other instanceof Folder)
|
|
|
|
|
return this.id == ((Folder) other).id;
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int hashCode() {
|
|
|
|
|
return Objects.hash(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7567,25 +7554,25 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|
|
|
|
tvSourceFolders.setText(getDisplay(result, false));
|
|
|
|
|
tvTargetFolders.setText(getDisplay(result, true));
|
|
|
|
|
|
|
|
|
|
List<MessageTarget.Folder> sources = new ArrayList<>();
|
|
|
|
|
List<MessageTarget.Folder> targets = new ArrayList<>();
|
|
|
|
|
List<String> sources = new ArrayList<>();
|
|
|
|
|
List<String> targets = new ArrayList<>();
|
|
|
|
|
for (MessageTarget t : result) {
|
|
|
|
|
if (!sources.contains(t.sourceFolder))
|
|
|
|
|
sources.add(t.sourceFolder);
|
|
|
|
|
if (!targets.contains(t.targetFolder))
|
|
|
|
|
targets.add(t.targetFolder);
|
|
|
|
|
if (!sources.contains(t.sourceFolder.type))
|
|
|
|
|
sources.add(t.sourceFolder.type);
|
|
|
|
|
if (!targets.contains(t.targetFolder.type))
|
|
|
|
|
targets.add(t.targetFolder.type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Drawable source = null;
|
|
|
|
|
if (sources.size() == 1) {
|
|
|
|
|
source = getResources().getDrawable(EntityFolder.getIcon(sources.get(0).type), null);
|
|
|
|
|
source = getResources().getDrawable(EntityFolder.getIcon(sources.get(0)), null);
|
|
|
|
|
if (source != null)
|
|
|
|
|
source.setBounds(0, 0, source.getIntrinsicWidth(), source.getIntrinsicHeight());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Drawable target = null;
|
|
|
|
|
if (targets.size() == 1) {
|
|
|
|
|
target = getResources().getDrawable(EntityFolder.getIcon(targets.get(0).type), null);
|
|
|
|
|
target = getResources().getDrawable(EntityFolder.getIcon(targets.get(0)), null);
|
|
|
|
|
if (target != null)
|
|
|
|
|
target.setBounds(0, 0, target.getIntrinsicWidth(), target.getIntrinsicHeight());
|
|
|
|
|
}
|
|
|
|
|