Monitor hidden messages

This commit is contained in:
M66B
2019-04-11 17:12:20 +02:00
parent 903a57c020
commit a0038c41da
3 changed files with 25 additions and 1 deletions

View File

@@ -1798,6 +1798,20 @@ public class FragmentMessages extends FragmentBase {
setSubtitle(getString(R.string.title_folder_thread, account == null ? "" : account.name));
}
});
db.message().liveHidden(account, thread).observe(getViewLifecycleOwner(), new Observer<List<Long>>() {
@Override
public void onChanged(List<Long> ids) {
if (ids != null)
for (long id : ids) {
Log.i("Hidden id=" + id);
for (String key : values.keySet())
values.get(key).remove(id);
bodies.remove(id);
html.remove(id);
attachments.remove(id);
}
}
});
break;
case SEARCH: