mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Cleanup after review
This commit is contained in:
@@ -277,6 +277,7 @@
|
||||
<string name="blogs_delete_blog_dialog_message">Are you sure that you want to delete this Blog and all posts?\nNote that this will not delete the blog from other people\'s devices.</string>
|
||||
<string name="blogs_delete_blog_ok">Delete Blog</string>
|
||||
<string name="blogs_delete_blog_cancel">Keep</string>
|
||||
<string name="blogs_blog_deleted">Blog Deleted</string>
|
||||
<string name="blogs_remove_blog">Remove Blog</string>
|
||||
|
||||
<string name="blogs_blog_list">Blog List</string>
|
||||
|
||||
@@ -181,6 +181,7 @@ public class BlogControllerImpl extends DbControllerImpl
|
||||
try {
|
||||
Blog b = blogManager.getBlog(data.getGroupId());
|
||||
blogManager.removeBlog(b);
|
||||
resultHandler.onResult(true);
|
||||
} catch (DbException e) {
|
||||
if (LOG.isLoggable(WARNING))
|
||||
LOG.log(WARNING, e.toString(), e);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class BlogFragment extends BaseFragment implements BlogPostListener {
|
||||
private BriarRecyclerView list;
|
||||
|
||||
static BlogFragment newInstance(GroupId groupId, String name,
|
||||
boolean myBlog, boolean isNew) {
|
||||
boolean myBlog, boolean isNew) {
|
||||
|
||||
BlogFragment f = new BlogFragment();
|
||||
|
||||
@@ -204,7 +204,8 @@ public class BlogFragment extends BaseFragment implements BlogPostListener {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
|
||||
R.style.BriarDialogTheme);
|
||||
builder.setTitle(getString(R.string.blogs_delete_blog));
|
||||
builder.setMessage(getString(R.string.blogs_delete_blog_dialog_message));
|
||||
builder.setMessage(
|
||||
getString(R.string.blogs_delete_blog_dialog_message));
|
||||
builder.setPositiveButton(R.string.blogs_delete_blog_cancel, null);
|
||||
builder.setNegativeButton(R.string.blogs_delete_blog_ok, okListener);
|
||||
builder.show();
|
||||
@@ -216,8 +217,9 @@ public class BlogFragment extends BaseFragment implements BlogPostListener {
|
||||
@Override
|
||||
public void onResultUi(Boolean result) {
|
||||
if (!result) return;
|
||||
Toast.makeText(getActivity(), R.string.forum_left_toast,
|
||||
LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(),
|
||||
R.string.blogs_blog_deleted, LENGTH_SHORT)
|
||||
.show();
|
||||
getActivity().supportFinishAfterTransition();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -124,6 +124,7 @@ class BlogListAdapter extends
|
||||
ui.date.setText(
|
||||
DateUtils.getRelativeTimeSpanString(ctx, timestamp));
|
||||
ui.date.setVisibility(VISIBLE);
|
||||
ui.avatar.setProblem(false);
|
||||
ui.status.setVisibility(GONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ public class WriteBlogPostActivity extends BriarActivity
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
showOrHidePublishButton();
|
||||
enableOrDisablePublishButton();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -126,7 +126,7 @@ public class WriteBlogPostActivity extends BriarActivity
|
||||
return true;
|
||||
}
|
||||
|
||||
private void showOrHidePublishButton() {
|
||||
private void enableOrDisablePublishButton() {
|
||||
int bodyLength =
|
||||
StringUtils.toUtf8(bodyInput.getText().toString()).length;
|
||||
if (bodyLength > 0 && bodyLength <= MAX_BLOG_POST_BODY_LENGTH &&
|
||||
|
||||
@@ -104,6 +104,7 @@ class ForumListAdapter extends
|
||||
// Post Count
|
||||
int postCount = item.getPostCount();
|
||||
if (postCount > 0) {
|
||||
ui.avatar.setProblem(false);
|
||||
ui.postCount.setText(ctx.getResources()
|
||||
.getQuantityString(R.plurals.posts, postCount,
|
||||
postCount));
|
||||
|
||||
@@ -46,6 +46,7 @@ public class TrustIndicatorView extends ImageView {
|
||||
res = R.drawable.trust_indicator_unknown;
|
||||
}
|
||||
setImageDrawable(ContextCompat.getDrawable(getContext(), res));
|
||||
setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user