mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-10 19:13:03 +02:00
Clear thread properties
This commit is contained in:
@@ -1397,15 +1397,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
}
|
||||
pgpService = null;
|
||||
|
||||
//kv.clear();
|
||||
//values.clear();
|
||||
//sizes.clear();
|
||||
//heights.clear();
|
||||
//positions.clear();
|
||||
//attachments.clear();
|
||||
//accountSwipes.clear();
|
||||
|
||||
//values.remove("selected");
|
||||
if (viewType == AdapterMessage.ViewType.THREAD) {
|
||||
PagedList<TupleMessageEx> list = adapter.getCurrentList();
|
||||
if (list != null)
|
||||
for (TupleMessageEx message : list)
|
||||
if (message != null)
|
||||
iProperties.clear(message.id);
|
||||
}
|
||||
|
||||
super.onDestroyView();
|
||||
}
|
||||
@@ -1844,6 +1842,37 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
public void finish() {
|
||||
FragmentMessages.this.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(long id) {
|
||||
for (String name : values.keySet())
|
||||
if (!"selected".equals(name))
|
||||
values.get(name).remove(id);
|
||||
|
||||
for (int i = 0; i < sizes.size(); i++)
|
||||
if (sizes.keyAt(i) == id) {
|
||||
sizes.removeAt(i);
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < heights.size(); i++)
|
||||
if (heights.keyAt(i) == id) {
|
||||
heights.removeAt(i);
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < positions.size(); i++)
|
||||
if (positions.keyAt(i) == id) {
|
||||
positions.removeAt(i);
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < attachments.size(); i++)
|
||||
if (attachments.keyAt(i) == id) {
|
||||
attachments.removeAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private ItemTouchHelper.Callback touchHelper = new ItemTouchHelper.Callback() {
|
||||
|
||||
Reference in New Issue
Block a user