Updated delete dialog message for chat rooms
This commit is contained in:
parent
a3edf4a1af
commit
7e7103db7a
4 changed files with 11 additions and 1 deletions
|
@ -198,6 +198,7 @@ Vos amis pourront vous joindre plus facilement si vous associez votre compte à
|
||||||
<string name="admin_unset">%s n\'est plus admin</string>
|
<string name="admin_unset">%s n\'est plus admin</string>
|
||||||
<string name="chat_room_leave_dialog">Souhaitez-vous vraiment quitter ce groupe ?</string>
|
<string name="chat_room_leave_dialog">Souhaitez-vous vraiment quitter ce groupe ?</string>
|
||||||
<string name="chat_room_leave_button">Quitter</string>
|
<string name="chat_room_leave_button">Quitter</string>
|
||||||
|
<string name="chat_room_delete_dialog">Voulez-vous supprimer et quitter les discussions sélectionnées ?</string>
|
||||||
<string name="separator"> : </string>
|
<string name="separator"> : </string>
|
||||||
<!--Status Bar-->
|
<!--Status Bar-->
|
||||||
<string name="status_connected">Enregistré</string>
|
<string name="status_connected">Enregistré</string>
|
||||||
|
|
|
@ -217,6 +217,7 @@
|
||||||
<string name="chat_room_creation_failed">Chat room creation failed</string>
|
<string name="chat_room_creation_failed">Chat room creation failed</string>
|
||||||
<string name="chat_room_leave_dialog">Do you really want to leave this group?</string>
|
<string name="chat_room_leave_dialog">Do you really want to leave this group?</string>
|
||||||
<string name="chat_room_leave_button">Leave</string>
|
<string name="chat_room_leave_button">Leave</string>
|
||||||
|
<string name="chat_room_delete_dialog">Do you want to delete and leave the selected conversations?</string>
|
||||||
<string name="separator">: </string>
|
<string name="separator">: </string>
|
||||||
|
|
||||||
<!-- Status Bar -->
|
<!-- Status Bar -->
|
||||||
|
|
|
@ -69,6 +69,7 @@ public class ChatListFragment extends Fragment implements OnItemClickListener, C
|
||||||
mSelectionHelper = new ListSelectionHelper(view, this);
|
mSelectionHelper = new ListSelectionHelper(view, this);
|
||||||
mChatRoomsAdapter = new ChatRoomsAdapter(getActivity(), mSelectionHelper, mInflater);
|
mChatRoomsAdapter = new ChatRoomsAdapter(getActivity(), mSelectionHelper, mInflater);
|
||||||
mSelectionHelper.setAdapter(mChatRoomsAdapter);
|
mSelectionHelper.setAdapter(mChatRoomsAdapter);
|
||||||
|
mSelectionHelper.setDialogMessage(R.string.chat_room_delete_dialog);
|
||||||
|
|
||||||
mWaitLayout = view.findViewById(R.id.waitScreen);
|
mWaitLayout = view.findViewById(R.id.waitScreen);
|
||||||
mWaitLayout.setVisibility(View.GONE);
|
mWaitLayout.setVisibility(View.GONE);
|
||||||
|
|
|
@ -35,6 +35,11 @@ public class ListSelectionHelper {
|
||||||
private ListSelectionAdapter mAdapter;
|
private ListSelectionAdapter mAdapter;
|
||||||
private DeleteListener mDeleteListener;
|
private DeleteListener mDeleteListener;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
private int mDialogDeleteMessageResourceId;
|
||||||
|
|
||||||
|
public void setDialogMessage(int id) {
|
||||||
|
mDialogDeleteMessageResourceId = id;
|
||||||
|
}
|
||||||
|
|
||||||
public interface DeleteListener {
|
public interface DeleteListener {
|
||||||
void onDeleteSelection(Object[] objectsToDelete);
|
void onDeleteSelection(Object[] objectsToDelete);
|
||||||
|
@ -86,7 +91,7 @@ public class ListSelectionHelper {
|
||||||
mDeleteSelectionButton.setOnClickListener(new View.OnClickListener() {
|
mDeleteSelectionButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
final Dialog dialog = LinphoneActivity.instance().displayDialog(mContext.getString(R.string.delete_text));
|
final Dialog dialog = LinphoneActivity.instance().displayDialog(mContext.getString(mDialogDeleteMessageResourceId));
|
||||||
Button delete = dialog.findViewById(R.id.delete_button);
|
Button delete = dialog.findViewById(R.id.delete_button);
|
||||||
Button cancel = dialog.findViewById(R.id.cancel);
|
Button cancel = dialog.findViewById(R.id.cancel);
|
||||||
|
|
||||||
|
@ -109,6 +114,8 @@ public class ListSelectionHelper {
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mDialogDeleteMessageResourceId = R.string.delete_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdapter(ListSelectionAdapter adapter) {
|
public void setAdapter(ListSelectionAdapter adapter) {
|
||||||
|
|
Loading…
Reference in a new issue