mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Get widget messages in a transaction
This commit is contained in:
parent
6adead5905
commit
f142b90efe
1 changed files with 9 additions and 1 deletions
|
@ -81,7 +81,15 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot
|
|||
colorWidgetRead = ContextCompat.getColor(context, R.color.colorWidgetRead);
|
||||
|
||||
DB db = DB.getInstance(context);
|
||||
messages = db.message().getWidgetUnified(folder < 0 ? null : folder, threading, unseen, flagged);
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
messages = db.message().getWidgetUnified(folder < 0 ? null : folder, threading, unseen, flagged);
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue