diff --git a/briar-android/src/main/java/org/briarproject/briar/android/forum/ForumListAdapter.java b/briar-android/src/main/java/org/briarproject/briar/android/forum/ForumListAdapter.java index b49ba9d6b4e674f19caba960489387ea5ec1fbfa..d2c4b96d388a2ebca2dfb573d3e6bc7e8a859498 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/forum/ForumListAdapter.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/forum/ForumListAdapter.java @@ -52,19 +52,15 @@ class ForumListAdapter // Post Count int postCount = item.getPostCount(); if (postCount > 0) { - ui.avatar.setProblem(false); ui.postCount.setText(ctx.getResources() .getQuantityString(R.plurals.posts, postCount, postCount)); ui.postCount.setTextColor( - ContextCompat - .getColor(ctx, R.color.briar_text_secondary)); + ContextCompat.getColor(ctx, R.color.briar_text_secondary)); } else { - ui.avatar.setProblem(true); ui.postCount.setText(ctx.getString(R.string.no_posts)); ui.postCount.setTextColor( - ContextCompat - .getColor(ctx, R.color.briar_text_tertiary)); + ContextCompat.getColor(ctx, R.color.briar_text_tertiary)); } // Date diff --git a/briar-android/src/main/java/org/briarproject/briar/android/privategroup/list/GroupViewHolder.java b/briar-android/src/main/java/org/briarproject/briar/android/privategroup/list/GroupViewHolder.java index e09e371bf577eef70bdd422ed623b2f46d1df4a0..a2992ef8905c86757ce4c7792df1d0f26b7b3c88 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/privategroup/list/GroupViewHolder.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/privategroup/list/GroupViewHolder.java @@ -74,9 +74,7 @@ class GroupViewHolder extends RecyclerView.ViewHolder { if (group.isEmpty()) { postCount.setVisibility(GONE); date.setVisibility(GONE); - avatar.setProblem(true); - status - .setText(ctx.getString(R.string.groups_group_is_empty)); + status.setText(ctx.getString(R.string.groups_group_is_empty)); status.setVisibility(VISIBLE); } else { // Message Count @@ -91,7 +89,6 @@ class GroupViewHolder extends RecyclerView.ViewHolder { long lastUpdate = group.getTimestamp(); date.setText(UiUtils.formatDate(ctx, lastUpdate)); date.setVisibility(VISIBLE); - avatar.setProblem(false); status.setVisibility(GONE); } remove.setVisibility(GONE); diff --git a/briar-android/src/main/java/org/briarproject/briar/android/view/TextAvatarView.java b/briar-android/src/main/java/org/briarproject/briar/android/view/TextAvatarView.java index 9d24bbe7543edfb34faf02b089c13bc99b67c34f..b06ba54197b8c44dcc9e3c036fc7035e3184d89c 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/view/TextAvatarView.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/view/TextAvatarView.java @@ -5,7 +5,6 @@ import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.support.annotation.UiThread; -import android.support.v4.content.ContextCompat; import android.support.v7.widget.AppCompatTextView; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -26,7 +25,6 @@ public class TextAvatarView extends FrameLayout { private final AppCompatTextView character; private final CircleImageView background; private final TextView badge; - private int unreadCount; public TextAvatarView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); @@ -49,30 +47,14 @@ public class TextAvatarView extends FrameLayout { } public void setUnreadCount(int count) { - unreadCount = count; if (count > 0) { - badge.setBackgroundResource(R.drawable.bubble); badge.setText(String.valueOf(count)); - badge.setTextColor(ContextCompat.getColor(getContext(), - R.color.briar_text_primary_inverse)); badge.setVisibility(VISIBLE); } else { badge.setVisibility(INVISIBLE); } } - public void setProblem(boolean problem) { - if (problem) { - badge.setBackgroundResource(R.drawable.bubble_problem); - badge.setText("!"); - badge.setTextColor(ContextCompat - .getColor(getContext(), R.color.briar_primary)); - badge.setVisibility(VISIBLE); - } else { - setUnreadCount(unreadCount); - } - } - public void setBackgroundBytes(byte[] bytes) { int r = getByte(bytes, 0) * 3 / 4 + 96; int g = getByte(bytes, 1) * 3 / 4 + 96; diff --git a/briar-android/src/main/res/drawable/bubble_problem.xml b/briar-android/src/main/res/drawable/bubble_problem.xml deleted file mode 100644 index 9d27c95966868597028bb7fef6761db186ae9cad..0000000000000000000000000000000000000000 --- a/briar-android/src/main/res/drawable/bubble_problem.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape - xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - - <corners - android:radius="@dimen/unread_bubble_size"/> - - <padding - android:left="@dimen/unread_bubble_padding_horizontal" - android:right="@dimen/unread_bubble_padding_horizontal"/> - - <solid - android:color="@color/briar_gold"/> - - <stroke - android:color="@color/briar_primary" - android:width="@dimen/avatar_border_width"/> - -</shape> - diff --git a/briar-android/src/main/res/values/strings.xml b/briar-android/src/main/res/values/strings.xml index 01630d88929f00ee94b3581230ab71de2502d7fa..47e6b8c95563cec1a033bb4b3eebdcaa9013cdca 100644 --- a/briar-android/src/main/res/values/strings.xml +++ b/briar-android/src/main/res/values/strings.xml @@ -36,8 +36,8 @@ <string name="startup_failed_notification_title">Briar could not start</string> <string name="startup_failed_notification_text">Tap for more information.</string> <string name="startup_failed_activity_title">Briar Startup Failure</string> - <string name="startup_failed_db_error">For some reason, your Briar database is corrupted beyond repair. Your account, your data and all your contacts are lost. Unfortunately, you need to reinstall Briar and set up a new account by choosing \'I have forgotten my password\' at the password prompt.</string> - <string name="startup_failed_data_too_old_error">Your account was created with an old version of this app and cannot be opened with this version. You must either reinstall the old version or delete your old account by choosing \'I have forgotten my password\' at the password prompt.</string> + <string name="startup_failed_db_error">For some reason, your Briar database is corrupted beyond repair. Your account, your data and all your contacts are lost. Unfortunately, you need to reinstall Briar or set up a new account by choosing \'I have forgotten my password\' at the password prompt.</string> + <string name="startup_failed_data_too_old_error">Your account was created with an old version of this app and cannot be opened with this version. You must either reinstall the old version or set up a new account by choosing \'I have forgotten my password\' at the password prompt.</string> <string name="startup_failed_data_too_new_error">This version of the app is too old. Please upgrade to the latest version and try again.</string> <string name="startup_failed_service_error">Briar was unable to start a required plugin. Reinstalling Briar usually solves this problem. However, please note that you will then lose your account and all data associated with it since Briar is not using central servers to store your data on.</string> <plurals name="expiry_warning"> @@ -109,9 +109,9 @@ <string name="sorry">Sorry</string> <!-- Contacts and Private Conversations--> - <string name="no_contacts">It seems that you are new here and have no contacts yet.\n\nTap the + icon at the top and follow the instructions to add some friends to your list.\n\nPlease remember: You can only add new contacts face-to-face to prevent anyone from impersonating you or reading your messages in the future.</string> + <string name="no_contacts">No contacts to show\n\nTap the + icon to add a contact</string> <string name="date_no_private_messages">No messages.</string> - <string name="no_private_messages">This is the conversation view.\n\nThere seems to be a lack of conversation.\n\nJust tap the input field at the bottom to start a conversation.</string> + <string name="no_private_messages">No messages to show</string> <string name="message_hint">Type message</string> <string name="delete_contact">Delete contact</string> <string name="dialog_title_delete_contact">Confirm Contact Deletion</string> @@ -162,7 +162,7 @@ </plurals> <!-- Private Groups --> - <string name="groups_list_empty">You are not participating in any groups.\n\nTap the + icon at the top to create a group yourself or ask your contacts to get invited into one of their groups.</string> + <string name="groups_list_empty">No groups to show\n\nTap the + icon to create a group, or ask your contacts to share groups with you</string> <string name="groups_created_by">Created by %s</string> <plurals name="messages"> <item quantity="one">%d message</item> @@ -218,7 +218,7 @@ <string name="groups_reveal_invisible">Contact relationship is not visible to the group</string> <!-- Forums --> - <string name="no_forums">You don\'t have any forums yet.\n\nWhy don\'t you create a new one yourself by tapping the + icon at the top?\n\nYou can also ask your contacts to share forums with you.</string> + <string name="no_forums">No forums to show\n\nTap the + icon to create a forum, or ask your contacts to share forums with you</string> <string name="create_forum_title">Create Forum</string> <string name="choose_forum_hint">Choose a name for your forum</string> <string name="create_forum_button">Create Forum</string> @@ -235,24 +235,24 @@ <string name="btn_reply">Reply</string> <string name="forum_leave">Leave Forum</string> <string name="dialog_title_leave_forum">Confirm Leaving Forum</string> - <string name="dialog_message_leave_forum">Are you sure that you want to leave this forum? Contacts you have shared this forum with might get cut off from receiving updates for this forum.</string> + <string name="dialog_message_leave_forum">Are you sure that you want to leave this forum?\n\nAny contacts you\'ve shared this forum with might stop receiving updates.</string> <string name="dialog_button_leave">Leave</string> - <string name="forum_left_toast">Left Forum</string> + <string name="forum_left_toast">Left forum</string> <!-- Forum Sharing --> <string name="forum_share_button">Share Forum</string> <string name="contacts_selected">Contacts selected</string> <string name="activity_share_toolbar_header">Choose Contacts</string> - <string name="no_contacts_selector">It seems that you are new here and have no contacts yet.\n\nPlease come back here after you added your first contact.</string> + <string name="no_contacts_selector">No contacts to show\n\nPlease come back here after adding a contact</string> <string name="forum_shared_snackbar">Forum shared with chosen contacts</string> <string name="forum_share_message">Add a message (optional)</string> <string name="forum_share_error">There was an error sharing this forum.</string> <string name="forum_invitation_received">%1$s has shared the forum \"%2$s\" with you.</string> <string name="forum_invitation_sent">You have shared the forum \"%1$s\" with %2$s.</string> <string name="forum_invitations_title">Forum Invitations</string> - <string name="forum_invitation_exists">You accepted an invitation to this forum already. Accepting more invitations will grow and strengthen the communication in the forum.</string> - <string name="forum_joined_toast">Joined Forum</string> - <string name="forum_declined_toast">Forum Invitation Declined</string> + <string name="forum_invitation_exists">You accepted an invitation to this forum already.\n\nAccepting more invitations will make your connection to the forum faster and more reliable.</string> + <string name="forum_joined_toast">Joined forum</string> + <string name="forum_declined_toast">Invitation declined</string> <string name="shared_by_format">Shared by %s</string> <string name="forum_invitation_already_sharing">Already sharing</string> <string name="forum_invitation_response_accepted_sent">You accepted the forum invitation from %s.</string> @@ -270,19 +270,19 @@ <string name="nobody">Nobody</string> <!-- Blogs --> - <string name="blogs_other_blog_empty_state">This blog is currently empty.\n\nEither the author hasn\'t written anything yet, or the person who shared this blog with you needs to come online, so posts can be synchronized.</string> + <string name="blogs_other_blog_empty_state">No posts to show</string> <string name="read_more">read more</string> <string name="blogs_write_blog_post">Write Blog Post</string> - <string name="blogs_write_blog_post_body_hint">Type your blog post here</string> + <string name="blogs_write_blog_post_body_hint">Type your blog post</string> <string name="blogs_publish_blog_post">Publish</string> <string name="blogs_blog_post_created">Blog Post Created</string> <string name="blogs_blog_post_received">New Blog Post Received</string> <string name="blogs_blog_post_scroll_to">Scroll To</string> - <string name="blogs_feed_empty_state">This is the global blog feed.\n\nIt looks like nobody blogged anything, yet.\n\nBe the first and tap the pen icon to write a new blog post.</string> + <string name="blogs_feed_empty_state">No posts to show\n\nPosts from your contacts and blogs you subscribe to will appear here\n\nTap the pen icon to write a post</string> <string name="blogs_remove_blog">Remove Blog</string> - <string name="blogs_remove_blog_dialog_message">Are you sure that you want to remove this blog and all posts?\nNote that this will not remove the blog from other people\'s devices.</string> - <string name="blogs_remove_blog_ok">Remove Blog</string> - <string name="blogs_blog_removed">Blog Removed</string> + <string name="blogs_remove_blog_dialog_message">Are you sure that you want to remove this blog?\n\nPosts will be removed from your device but not from other people\'s devices.\n\nAny contacts you\'ve shared this blog with might stop receiving updates.</string> + <string name="blogs_remove_blog_ok">Remove</string> + <string name="blogs_blog_removed">Blog removed</string> <string name="blogs_reblog_comment_hint">Add a comment (optional)</string> <string name="blogs_reblog_button">Reblog</string> @@ -298,8 +298,8 @@ <string name="blogs_sharing_invitation_received">%1$s has shared the blog \"%2$s\" with you.</string> <string name="blogs_sharing_invitation_sent">You have shared the blog \"%1$s\" with %2$s.</string> <string name="blogs_sharing_invitations_title">Blog Invitations</string> - <string name="blogs_sharing_joined_toast">Subscribed to Blog</string> - <string name="blogs_sharing_declined_toast">Blog Invitation Declined</string> + <string name="blogs_sharing_joined_toast">Subscribed to blog</string> + <string name="blogs_sharing_declined_toast">Invitation declined</string> <string name="sharing_status_blog">Anyone who subscribes to a blog can share it with their contacts. You are sharing this blog with the following contacts. There may also be other subscribers who you can\'t see.</string> <!-- RSS Feeds --> @@ -312,10 +312,10 @@ <string name="blogs_rss_feeds_manage_author">Author:</string> <string name="blogs_rss_feeds_manage_updated">Last Updated:</string> <string name="blogs_rss_remove_feed">Remove Feed</string> - <string name="blogs_rss_remove_feed_dialog_message">Are you sure you want to remove this feed and all its posts?\nAny posts you have shared will not be removed from other people\'s devices.</string> - <string name="blogs_rss_remove_feed_ok">Remove Feed</string> + <string name="blogs_rss_remove_feed_dialog_message">Are you sure that you want to remove this feed?\n\nPosts will be removed from your device but not from other people\'s devices.\n\nAny contacts you\'ve shared this feed with might stop receiving updates.</string> + <string name="blogs_rss_remove_feed_ok">Remove</string> <string name="blogs_rss_feeds_manage_delete_error">The feed could not be deleted!</string> - <string name="blogs_rss_feeds_manage_empty_state">You haven\'t imported any RSS feeds.\n\nWhy don\'t you click the plus in the top right screen corner to add your first?</string> + <string name="blogs_rss_feeds_manage_empty_state">No RSS feeds to show\n\nTap the + icon to import a feed</string> <string name="blogs_rss_feeds_manage_error">There was a problem loading your feeds. Please try again later.</string> <!-- Settings Network -->