mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +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);
|
blogManager.addLocalPost(p);
|
||||||
postPublished();
|
postPublished();
|
||||||
} catch (DbException | GeneralSecurityException | FormatException e) {
|
} catch (DbException | GeneralSecurityException | FormatException e) {
|
||||||
// TODO show error
|
|
||||||
if (LOG.isLoggable(WARNING))
|
if (LOG.isLoggable(WARNING))
|
||||||
LOG.log(WARNING, e.toString(), e);
|
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