|
|
|
@ -150,8 +150,7 @@ public class ServiceUI extends IntentService {
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "ignore":
|
|
|
|
|
boolean view = intent.getBooleanExtra("view", false);
|
|
|
|
|
onIgnore(id, view);
|
|
|
|
|
onIgnore(id);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "wakeup":
|
|
|
|
@ -427,7 +426,7 @@ public class ServiceUI extends IntentService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onIgnore(long id, boolean open) {
|
|
|
|
|
private void onIgnore(long id) {
|
|
|
|
|
EntityMessage message;
|
|
|
|
|
EntityFolder folder;
|
|
|
|
|
|
|
|
|
@ -449,17 +448,6 @@ public class ServiceUI extends IntentService {
|
|
|
|
|
} finally {
|
|
|
|
|
db.endTransaction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (open) {
|
|
|
|
|
Intent thread = new Intent(this, ActivityView.class);
|
|
|
|
|
thread.setAction("thread:" + message.id);
|
|
|
|
|
thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
thread.putExtra("account", message.account);
|
|
|
|
|
thread.putExtra("folder", message.folder);
|
|
|
|
|
thread.putExtra("thread", message.thread);
|
|
|
|
|
thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(folder.type));
|
|
|
|
|
startActivity(thread);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onSync(long aid) {
|
|
|
|
@ -484,8 +472,9 @@ public class ServiceUI extends IntentService {
|
|
|
|
|
|
|
|
|
|
static void sync(Context context, Long account) {
|
|
|
|
|
try {
|
|
|
|
|
context.startService(new Intent(context, ServiceUI.class)
|
|
|
|
|
.setAction(account == null ? "sync" : "sync:" + account));
|
|
|
|
|
Intent sync = new Intent(context, ServiceUI.class)
|
|
|
|
|
.setAction(account == null ? "sync" : "sync:" + account);
|
|
|
|
|
context.startService(sync);
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
/*
|
|
|
|
@ -499,4 +488,14 @@ public class ServiceUI extends IntentService {
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ignore(Context context, long id) {
|
|
|
|
|
try {
|
|
|
|
|
Intent ignore = new Intent(context, ServiceUI.class)
|
|
|
|
|
.setAction("ignore:" + id);
|
|
|
|
|
context.startService(ignore);
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|