mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Refactored finishOnUiThread() into superclass.
This commit is contained in:
@@ -220,14 +220,6 @@ implements EventListener, OnClickListener, OnItemClickListener {
|
||||
});
|
||||
}
|
||||
|
||||
private void finishOnUiThread() {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int request, int result, Intent data) {
|
||||
super.onActivityResult(request, result, data);
|
||||
|
||||
@@ -235,11 +235,7 @@ implements OnClickListener {
|
||||
});
|
||||
} catch(NoSuchMessageException e) {
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Message removed");
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
finishOnUiThread();
|
||||
} catch(DbException e) {
|
||||
if(LOG.isLoggable(WARNING))
|
||||
LOG.log(WARNING, e.toString(), e);
|
||||
|
||||
@@ -166,9 +166,9 @@ implements OnClickListener {
|
||||
LOG.info("Load took " + duration + " ms");
|
||||
displayLocalAuthor();
|
||||
} catch(NoSuchContactException e) {
|
||||
finish();
|
||||
finishOnUiThread();
|
||||
} catch(NoSuchSubscriptionException e) {
|
||||
finish();
|
||||
finishOnUiThread();
|
||||
} catch(DbException e) {
|
||||
if(LOG.isLoggable(WARNING))
|
||||
LOG.log(WARNING, e.toString(), e);
|
||||
|
||||
Reference in New Issue
Block a user