mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
rename enum, add todo
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
8ea9663d5e
commit
809e277855
@ -935,7 +935,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
@OnClick(R.id.joinConversationViaLinkRelativeLayout)
|
@OnClick(R.id.joinConversationViaLinkRelativeLayout)
|
||||||
void joinConversationViaLink() {
|
void joinConversationViaLink() {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable(BundleKeys.INSTANCE.getKEY_OPERATION_CODE(), ConversationOperationEnum.GET_JOIN_ROOM);
|
bundle.putSerializable(BundleKeys.INSTANCE.getKEY_OPERATION_CODE(), ConversationOperationEnum.GET_AND_JOIN_ROOM);
|
||||||
|
|
||||||
prepareAndShowBottomSheetWithBundle(bundle);
|
prepareAndShowBottomSheetWithBundle(bundle);
|
||||||
}
|
}
|
||||||
|
@ -803,6 +803,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
return onQueryTextChange(query);
|
return onQueryTextChange(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO check when this is executed and if handling is correct
|
||||||
private void prepareAndShowBottomSheetWithBundle(Bundle bundle) {
|
private void prepareAndShowBottomSheetWithBundle(Bundle bundle) {
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
|
view = getActivity().getLayoutInflater().inflate(R.layout.bottom_sheet, null, false);
|
||||||
@ -1020,7 +1021,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
bundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_ID(), selectedConversation.getRoomId());
|
bundle.putString(BundleKeys.INSTANCE.getKEY_ROOM_ID(), selectedConversation.getRoomId());
|
||||||
bundle.putString(BundleKeys.INSTANCE.getKEY_SHARED_TEXT(), textToPaste);
|
bundle.putString(BundleKeys.INSTANCE.getKEY_SHARED_TEXT(), textToPaste);
|
||||||
|
|
||||||
// TODO debug & fix dialog???
|
// TODO check when this is executed and if handling is correct
|
||||||
// when is hasPassword && ParticipantType.GUEST true? currently the app can't be used as guest?!
|
// when is hasPassword && ParticipantType.GUEST true? currently the app can't be used as guest?!
|
||||||
// when is USER_FOLLOWING_LINK true? --> from contactsController via enter link?
|
// when is USER_FOLLOWING_LINK true? --> from contactsController via enter link?
|
||||||
if ((selectedConversation.hasPassword
|
if ((selectedConversation.hasPassword
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
package com.nextcloud.talk.controllers.bottomsheet
|
package com.nextcloud.talk.controllers.bottomsheet
|
||||||
|
|
||||||
enum class ConversationOperationEnum {
|
enum class ConversationOperationEnum {
|
||||||
RENAME_ROOM, // 2
|
RENAME_ROOM,
|
||||||
MAKE_PUBLIC, // 3
|
MAKE_PUBLIC,
|
||||||
CHANGE_PASSWORD, // 4
|
CHANGE_PASSWORD,
|
||||||
CLEAR_PASSWORD, // 5
|
CLEAR_PASSWORD,
|
||||||
SET_PASSWORD, // 6
|
SET_PASSWORD,
|
||||||
SHARE_LINK, // 7
|
SHARE_LINK,
|
||||||
MAKE_PRIVATE, // 8
|
MAKE_PRIVATE,
|
||||||
GET_JOIN_ROOM, // 10 diff to 99?!
|
GET_AND_JOIN_ROOM,
|
||||||
INVITE_USERS, // 11
|
INVITE_USERS,
|
||||||
MARK_AS_READ, // 96
|
MARK_AS_READ,
|
||||||
REMOVE_FAVORITE, // 97
|
REMOVE_FAVORITE,
|
||||||
ADD_FAVORITE, // 98
|
ADD_FAVORITE,
|
||||||
JOIN_ROOM, // 99 diff to 10?!
|
JOIN_ROOM
|
||||||
}
|
}
|
@ -155,7 +155,7 @@ public class EntryMenuController extends BaseController {
|
|||||||
getRouter().pushController(RouterTransaction.with(new OperationsMenuController(bundle))
|
getRouter().pushController(RouterTransaction.with(new OperationsMenuController(bundle))
|
||||||
.pushChangeHandler(new HorizontalChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new HorizontalChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
} else if (operation != ConversationOperationEnum.SHARE_LINK && operation != ConversationOperationEnum.GET_JOIN_ROOM && operation != ConversationOperationEnum.INVITE_USERS) {
|
} else if (operation != ConversationOperationEnum.SHARE_LINK && operation != ConversationOperationEnum.GET_AND_JOIN_ROOM && operation != ConversationOperationEnum.INVITE_USERS) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
if (operation == ConversationOperationEnum.CHANGE_PASSWORD || operation == ConversationOperationEnum.SET_PASSWORD) {
|
if (operation == ConversationOperationEnum.CHANGE_PASSWORD || operation == ConversationOperationEnum.SET_PASSWORD) {
|
||||||
conversation.setPassword(editText.getText().toString());
|
conversation.setPassword(editText.getText().toString());
|
||||||
@ -238,7 +238,7 @@ public class EntryMenuController extends BaseController {
|
|||||||
}
|
}
|
||||||
textInputLayout.setError(getResources().getString(R.string.nc_call_name_is_same));
|
textInputLayout.setError(getResources().getString(R.string.nc_call_name_is_same));
|
||||||
}
|
}
|
||||||
} else if (operation != ConversationOperationEnum.GET_JOIN_ROOM) {
|
} else if (operation != ConversationOperationEnum.GET_AND_JOIN_ROOM) {
|
||||||
if (!proceedButton.isEnabled()) {
|
if (!proceedButton.isEnabled()) {
|
||||||
proceedButton.setEnabled(true);
|
proceedButton.setEnabled(true);
|
||||||
proceedButton.setAlpha(1.0f);
|
proceedButton.setAlpha(1.0f);
|
||||||
@ -247,7 +247,6 @@ public class EntryMenuController extends BaseController {
|
|||||||
} else if ((editText.getText().toString().startsWith("http://") ||
|
} else if ((editText.getText().toString().startsWith("http://") ||
|
||||||
editText.getText().toString().startsWith("https://")) &&
|
editText.getText().toString().startsWith("https://")) &&
|
||||||
editText.getText().toString().contains("/call/")) {
|
editText.getText().toString().contains("/call/")) {
|
||||||
// operation code 10
|
|
||||||
if (!proceedButton.isEnabled()) {
|
if (!proceedButton.isEnabled()) {
|
||||||
proceedButton.setEnabled(true);
|
proceedButton.setEnabled(true);
|
||||||
proceedButton.setAlpha(1.0f);
|
proceedButton.setAlpha(1.0f);
|
||||||
@ -312,7 +311,7 @@ public class EntryMenuController extends BaseController {
|
|||||||
labelText = getResources().getString(R.string.nc_password);
|
labelText = getResources().getString(R.string.nc_password);
|
||||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||||
break;
|
break;
|
||||||
case GET_JOIN_ROOM:
|
case GET_AND_JOIN_ROOM:
|
||||||
labelText = getResources().getString(R.string.nc_conversation_link);
|
labelText = getResources().getString(R.string.nc_conversation_link);
|
||||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
|
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
|
||||||
break;
|
break;
|
||||||
|
@ -322,7 +322,7 @@ public class OperationsMenuController extends BaseController {
|
|||||||
.retry(1)
|
.retry(1)
|
||||||
.subscribe(genericOperationsObserver);
|
.subscribe(genericOperationsObserver);
|
||||||
break;
|
break;
|
||||||
case GET_JOIN_ROOM:
|
case GET_AND_JOIN_ROOM:
|
||||||
ncApi.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, baseUrl, conversationToken))
|
ncApi.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, baseUrl, conversationToken))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
Loading…
Reference in New Issue
Block a user