Skip to content
Snippets Groups Projects
Commit 8504cfa8 authored by str4d's avatar str4d
Browse files

Re-enable UI if blog post fails to publish

parent dd1eed5a
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment