use the term channel in destroy dialog
This commit is contained in:
parent
4c8b1eb4bc
commit
ef09b0ab1a
|
@ -355,9 +355,12 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
final boolean groupChat = mConversation != null && mConversation.isPrivateAndNonAnonymous();
|
||||||
getMenuInflater().inflate(R.menu.muc_details, menu);
|
getMenuInflater().inflate(R.menu.muc_details, menu);
|
||||||
final MenuItem share = menu.findItem(R.id.action_share);
|
final MenuItem share = menu.findItem(R.id.action_share);
|
||||||
share.setVisible(mConversation != null && !mConversation.isPrivateAndNonAnonymous());
|
share.setVisible(groupChat);
|
||||||
|
final MenuItem destroy = menu.findItem(R.id.action_destroy_room);
|
||||||
|
destroy.setTitle(groupChat ? R.string.destroy_room : R.string.destroy_channel);
|
||||||
AccountUtils.showHideMenuItems(menu);
|
AccountUtils.showHideMenuItems(menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
@ -387,9 +390,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void destroyRoom() {
|
protected void destroyRoom() {
|
||||||
|
final boolean groupChat = mConversation != null && mConversation.isPrivateAndNonAnonymous();
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.destroy_room);
|
builder.setTitle(groupChat ? R.string.destroy_room : R.string.destroy_channel);
|
||||||
builder.setMessage(R.string.destroy_room_dialog);
|
builder.setMessage(groupChat ? R.string.destroy_room_dialog : R.string.destroy_channel_dialog);
|
||||||
builder.setPositiveButton(R.string.ok, (dialog, which) -> {
|
builder.setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||||
xmppConnectionService.destroyRoom(mConversation, ConferenceDetailsActivity.this);
|
xmppConnectionService.destroyRoom(mConversation, ConferenceDetailsActivity.this);
|
||||||
});
|
});
|
||||||
|
@ -580,7 +584,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRoomDestroyFailed() {
|
public void onRoomDestroyFailed() {
|
||||||
displayToast(getString(R.string.could_not_destroy_room));
|
final boolean groupChat = mConversation != null && mConversation.isPrivateAndNonAnonymous();
|
||||||
|
displayToast(getString(groupChat ? R.string.could_not_destroy_room : R.string.could_not_destroy_channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -228,8 +228,11 @@
|
||||||
<string name="save_as_bookmark">Save as bookmark</string>
|
<string name="save_as_bookmark">Save as bookmark</string>
|
||||||
<string name="delete_bookmark">Delete bookmark</string>
|
<string name="delete_bookmark">Delete bookmark</string>
|
||||||
<string name="destroy_room">Destroy group chat</string>
|
<string name="destroy_room">Destroy group chat</string>
|
||||||
|
<string name="destroy_channel">Destroy channel</string>
|
||||||
<string name="destroy_room_dialog">Are you sure you want to destroy this group chat?\n\n<b>Warning:</b> The group chat will be completely removed on the server.</string>
|
<string name="destroy_room_dialog">Are you sure you want to destroy this group chat?\n\n<b>Warning:</b> The group chat will be completely removed on the server.</string>
|
||||||
|
<string name="destroy_channel_dialog">Are you sure you want to destroy this public channel?\n\n<b>Warning:</b> The channel will be completely removed on the server.</string>
|
||||||
<string name="could_not_destroy_room">Could not destroy group chat</string>
|
<string name="could_not_destroy_room">Could not destroy group chat</string>
|
||||||
|
<string name="could_not_destroy_channel">Could not destroy channel</string>
|
||||||
<string name="bookmark_already_exists">This bookmark already exists</string>
|
<string name="bookmark_already_exists">This bookmark already exists</string>
|
||||||
<string name="action_edit_subject">Edit group chat subject</string>
|
<string name="action_edit_subject">Edit group chat subject</string>
|
||||||
<string name="topic">Topic</string>
|
<string name="topic">Topic</string>
|
||||||
|
|
Loading…
Reference in New Issue