mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Updated forum toasts and renamed delete icon.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_social_remove_person"
|
||||
android:icon="@drawable/social_remove_person"
|
||||
android:icon="@drawable/action_delete_white"
|
||||
android:title="@string/delete_contact"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_forum_delete"
|
||||
android:icon="@drawable/social_remove_person"
|
||||
android:icon="@drawable/action_delete_white"
|
||||
android:title="@string/forum_leave"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</plurals>
|
||||
<string name="show_forums">Show</string>
|
||||
<string name="forum_leave">Leave Forum</string>
|
||||
<string name="forum_left_toast">Forum Left</string>
|
||||
<string name="forum_left_toast">Left Forum</string>
|
||||
<string name="no_forum_posts">No posts</string>
|
||||
<string name="create_forum_title">New Forum</string>
|
||||
<string name="choose_forum_name">Choose a name for your forum:</string>
|
||||
@@ -95,7 +95,7 @@
|
||||
<string name="identity_created_toast">Identity created</string>
|
||||
<string name="forum_post_hint">Type forum post</string>
|
||||
<string name="available_forums_title">Available Forums</string>
|
||||
<string name="subscribed_toast">Subscribed</string>
|
||||
<string name="forum_joined_toast">Joined Forum</string>
|
||||
<string name="shared_by_format">Shared by %s</string>
|
||||
<string name="no_contacts_prompt">You don\'t have any contacts. Add a contact now?</string>
|
||||
<string name="add_button">Add</string>
|
||||
@@ -193,10 +193,10 @@
|
||||
<string name="dialog_welcome_message">Add a contact to start communicating securely or press the icon in the upper left corner of the screen for more options.</string>
|
||||
<string name="dialog_title_share_crash_report">Briar has crashed</string>
|
||||
<string name="dialog_message_share_crash_report">Would you like to review the crash report and send it to the developers? It will be stored encrypted on your device until the next time you log into Briar, and then sent securely to the developers.</string>
|
||||
<string name="dialog_title_remove_forum">Confirm Leaving Forum</string>
|
||||
<string name="dialog_message_remove_forum">Are you sure that you want to remove this forum? Contacts you have shared this forum with might get cut off from receiving updates for this 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_button_ok">OK</string>
|
||||
<string name="dialog_button_remove">Remove</string>
|
||||
<string name="dialog_button_leave">Leave</string>
|
||||
<string name="dialog_button_introduce">Introduce</string>
|
||||
<string name="dialog_button_accept">Accept</string>
|
||||
<string name="dialog_button_decline">Decline</string>
|
||||
|
||||
@@ -83,8 +83,7 @@ implements EventListener, OnItemClickListener {
|
||||
runOnDbThread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
Collection<ForumContacts> available =
|
||||
new ArrayList<ForumContacts>();
|
||||
Collection<ForumContacts> available = new ArrayList<>();
|
||||
long now = System.currentTimeMillis();
|
||||
for (Forum f : forumSharingManager.getAvailableForums()) {
|
||||
try {
|
||||
@@ -160,11 +159,11 @@ implements EventListener, OnItemClickListener {
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position,
|
||||
long id) {
|
||||
AvailableForumsItem item = adapter.getItem(position);
|
||||
Collection<ContactId> shared = new ArrayList<ContactId>();
|
||||
Collection<ContactId> shared = new ArrayList<>();
|
||||
for (Contact c : item.getContacts()) shared.add(c.getId());
|
||||
subscribe(item.getForum(), shared);
|
||||
String subscribed = getString(R.string.subscribed_toast);
|
||||
Toast.makeText(this, subscribed, LENGTH_SHORT).show();
|
||||
String joined = getString(R.string.forum_joined_toast);
|
||||
Toast.makeText(this, joined, LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private void subscribe(final Forum f, final Collection<ContactId> shared) {
|
||||
|
||||
@@ -403,9 +403,9 @@ public class ForumActivity extends BriarActivity implements EventListener,
|
||||
AlertDialog.Builder builder =
|
||||
new AlertDialog.Builder(ForumActivity.this,
|
||||
R.style.BriarDialogTheme);
|
||||
builder.setTitle(getString(R.string.dialog_title_remove_forum));
|
||||
builder.setMessage(getString(R.string.dialog_message_remove_forum));
|
||||
builder.setPositiveButton(R.string.dialog_button_remove, okListener);
|
||||
builder.setTitle(getString(R.string.dialog_title_leave_forum));
|
||||
builder.setMessage(getString(R.string.dialog_message_leave_forum));
|
||||
builder.setPositiveButton(R.string.dialog_button_leave, okListener);
|
||||
builder.setNegativeButton(android.R.string.cancel, null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user