mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
More cleanups
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
924bd7be3a
commit
507f9909fa
@ -239,8 +239,8 @@ public class CallActivity extends AppCompatActivity {
|
|||||||
.setRepeatCount(PulseAnimation.INFINITE)
|
.setRepeatCount(PulseAnimation.INFINITE)
|
||||||
.setRepeatMode(PulseAnimation.REVERSE);
|
.setRepeatMode(PulseAnimation.REVERSE);
|
||||||
|
|
||||||
roomToken = getIntent().getExtras().getString("roomToken", "");
|
roomToken = getIntent().getExtras().getString(BundleKeys.KEY_ROOM_TOKEN, "");
|
||||||
userEntity = Parcels.unwrap(getIntent().getExtras().getParcelable("userEntity"));
|
userEntity = Parcels.unwrap(getIntent().getExtras().getParcelable(BundleKeys.KEY_USER_ENTITY));
|
||||||
callSession = getIntent().getExtras().getString(BundleKeys.KEY_CALL_SESSION, "0");
|
callSession = getIntent().getExtras().getString(BundleKeys.KEY_CALL_SESSION, "0");
|
||||||
credentials = ApiHelper.getCredentials(userEntity.getUsername(), userEntity.getToken());
|
credentials = ApiHelper.getCredentials(userEntity.getUsername(), userEntity.getToken());
|
||||||
|
|
||||||
|
@ -319,9 +319,7 @@ public class AccountVerificationController extends BaseController {
|
|||||||
} else {
|
} else {
|
||||||
ApplicationWideMessageHolder.getInstance().setMessageType(
|
ApplicationWideMessageHolder.getInstance().setMessageType(
|
||||||
ApplicationWideMessageHolder.MessageType.FAILED_TO_IMPORT_ACCOUNT);
|
ApplicationWideMessageHolder.MessageType.FAILED_TO_IMPORT_ACCOUNT);
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (getRouter().hasRootController()) {
|
if (getRouter().hasRootController()) {
|
||||||
getRouter().popToRoot();
|
getRouter().popToRoot();
|
||||||
} else {
|
} else {
|
||||||
@ -335,7 +333,6 @@ public class AccountVerificationController extends BaseController {
|
|||||||
.popChangeHandler(new HorizontalChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, 7500);
|
}, 7500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -442,8 +442,8 @@ public class CallsListController extends BaseController implements SearchView.On
|
|||||||
if (callItem != null && getActivity() != null) {
|
if (callItem != null && getActivity() != null) {
|
||||||
Room room = callItem.getModel();
|
Room room = callItem.getModel();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomToken", callItem.getModel().getToken());
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, callItem.getModel().getToken());
|
||||||
bundle.putParcelable("userEntity", Parcels.wrap(userEntity));
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
||||||
|
|
||||||
if (room.hasPassword && (room.participantType.equals(Participant.ParticipantType.GUEST) ||
|
if (room.hasPassword && (room.participantType.equals(Participant.ParticipantType.GUEST) ||
|
||||||
room.participantType.equals(Participant.ParticipantType.USER_FOLLOWING_LINK))) {
|
room.participantType.equals(Participant.ParticipantType.USER_FOLLOWING_LINK))) {
|
||||||
|
@ -457,8 +457,8 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
overridePopHandler(new NoOpControllerChangeHandler());
|
overridePopHandler(new NoOpControllerChangeHandler());
|
||||||
Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomToken", roomOverall.getOcs().getData().getToken());
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
|
||||||
bundle.putParcelable("userEntity", Parcels.wrap(userEntity));
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
||||||
callIntent.putExtras(bundle);
|
callIntent.putExtras(bundle);
|
||||||
startActivity(callIntent);
|
startActivity(callIntent);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ public class EntryMenuController extends BaseController {
|
|||||||
eventBus.post(new BottomSheetLockEvent(false, 0, false, false));
|
eventBus.post(new BottomSheetLockEvent(false, 0, false, false));
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putParcelable(BundleKeys.KEY_ROOM, Parcels.wrap(room));
|
bundle.putParcelable(BundleKeys.KEY_ROOM, Parcels.wrap(room));
|
||||||
bundle.putParcelable("userEntity", Parcels.wrap(userEntity));
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
||||||
bundle.putString(BundleKeys.KEY_CALL_PASSWORD, editText.getText().toString());
|
bundle.putString(BundleKeys.KEY_CALL_PASSWORD, editText.getText().toString());
|
||||||
getRouter().pushController(RouterTransaction.with(new OperationsMenuController(bundle)));
|
getRouter().pushController(RouterTransaction.with(new OperationsMenuController(bundle)));
|
||||||
}
|
}
|
||||||
|
@ -102,8 +102,8 @@ public class OperationsMenuController extends BaseController {
|
|||||||
this.room = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_ROOM));
|
this.room = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_ROOM));
|
||||||
|
|
||||||
this.callPassword = args.getString(BundleKeys.KEY_CALL_PASSWORD, "");
|
this.callPassword = args.getString(BundleKeys.KEY_CALL_PASSWORD, "");
|
||||||
if (args.containsKey("userEntity")) {
|
if (args.containsKey(BundleKeys.KEY_USER_ENTITY)) {
|
||||||
this.userEntity = Parcels.unwrap(args.getParcelable("userEntity"));
|
this.userEntity = Parcels.unwrap(args.getParcelable(BundleKeys.KEY_USER_ENTITY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,8 +255,8 @@ public class OperationsMenuController extends BaseController {
|
|||||||
showResultImage(true);
|
showResultImage(true);
|
||||||
} else {
|
} else {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomToken", room.getToken());
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, room.getToken());
|
||||||
bundle.putParcelable("userEntity", Parcels.wrap(userEntity));
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
||||||
bundle.putString(BundleKeys.KEY_CALL_SESSION, ((CallOverall) o).getOcs().getData().getSessionId());
|
bundle.putString(BundleKeys.KEY_CALL_SESSION, ((CallOverall) o).getOcs().getData().getSessionId());
|
||||||
overridePushHandler(new NoOpControllerChangeHandler());
|
overridePushHandler(new NoOpControllerChangeHandler());
|
||||||
overridePopHandler(new NoOpControllerChangeHandler());
|
overridePopHandler(new NoOpControllerChangeHandler());
|
||||||
|
@ -45,6 +45,7 @@ import com.nextcloud.talk.api.models.json.push.PushMessage;
|
|||||||
import com.nextcloud.talk.models.SignatureVerification;
|
import com.nextcloud.talk.models.SignatureVerification;
|
||||||
import com.nextcloud.talk.utils.NotificationUtils;
|
import com.nextcloud.talk.utils.NotificationUtils;
|
||||||
import com.nextcloud.talk.utils.PushUtils;
|
import com.nextcloud.talk.utils.PushUtils;
|
||||||
|
import com.nextcloud.talk.utils.bundle.BundleKeys;
|
||||||
|
|
||||||
import org.parceler.Parcels;
|
import org.parceler.Parcels;
|
||||||
|
|
||||||
@ -94,8 +95,8 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
|
|||||||
|
|
||||||
Intent intent = new Intent(this, CallActivity.class);
|
Intent intent = new Intent(this, CallActivity.class);
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomToken", decryptedPushMessage.getId());
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, decryptedPushMessage.getId());
|
||||||
bundle.putParcelable("userEntity", Parcels.wrap(signatureVerification
|
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(signatureVerification
|
||||||
.getUserEntity()));
|
.getUserEntity()));
|
||||||
bundle.putBoolean("fromNotification", true);
|
bundle.putBoolean("fromNotification", true);
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
|
@ -34,4 +34,6 @@ public class BundleKeys {
|
|||||||
public static final String KEY_APP_ITEM_NAME = "KEY_APP_ITEM_NAME";
|
public static final String KEY_APP_ITEM_NAME = "KEY_APP_ITEM_NAME";
|
||||||
public static final String KEY_CALL_PASSWORD = "KEY_CALL_PASSWORD";
|
public static final String KEY_CALL_PASSWORD = "KEY_CALL_PASSWORD";
|
||||||
public static final String KEY_CALL_SESSION = "KEY_CALL_SESSION";
|
public static final String KEY_CALL_SESSION = "KEY_CALL_SESSION";
|
||||||
|
public static final String KEY_ROOM_TOKEN = "KEY_ROOM_TOKEN";
|
||||||
|
public static final String KEY_USER_ENTITY = "KEY_USER_ENTITY";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user