mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Re-enable UI if blog post fails to publish
This commit is contained in:
@@ -167,9 +167,9 @@ public class WriteBlogPostActivity extends BriarActivity
|
||||
blogManager.addLocalPost(p);
|
||||
postPublished();
|
||||
} catch (DbException | GeneralSecurityException | FormatException e) {
|
||||
// TODO show error
|
||||
if (LOG.isLoggable(WARNING))
|
||||
LOG.log(WARNING, e.toString(), e);
|
||||
postFailedToPublish();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -185,4 +185,16 @@ public class WriteBlogPostActivity extends BriarActivity
|
||||
});
|
||||
}
|
||||
|
||||
private void postFailedToPublish() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// hide progress bar, show publish button
|
||||
progressBar.setVisibility(GONE);
|
||||
publishButton.setVisibility(VISIBLE);
|
||||
// TODO show error
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user