mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-29 18:08:58 +03:00
Fix some bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
c4ee636e0c
commit
bf40f7eab8
4 changed files with 20 additions and 32 deletions
|
@ -50,6 +50,7 @@ import android.widget.ImageView;
|
|||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.bluelinelabs.conductor.RouterTransaction;
|
||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||
import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
|
@ -156,6 +157,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
private int newMessagesCount = 0;
|
||||
private Boolean startCallFromNotification;
|
||||
private String roomId;
|
||||
|
||||
/*
|
||||
TODO:
|
||||
- check push notifications
|
||||
|
@ -387,19 +389,6 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
return conversationName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleBack() {
|
||||
if (getRouter().hasRootController()) {
|
||||
getRouter().popToRoot(new HorizontalChangeHandler());
|
||||
} else {
|
||||
getRouter().setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
inChat = false;
|
||||
|
@ -500,7 +489,13 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
|
||||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
getRouter().popCurrentController();
|
||||
if (getRouter().hasRootController()) {
|
||||
getRouter().popToRoot(new VerticalChangeHandler());
|
||||
} else {
|
||||
getRouter().setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -744,14 +739,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
inChat = false;
|
||||
if (getRouter().hasRootController()) {
|
||||
getRouter().popToRoot(new HorizontalChangeHandler());
|
||||
} else {
|
||||
getRouter().setRoot(RouterTransaction.with(new MagicBottomNavigationController())
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
}
|
||||
onDestroy();
|
||||
return true;
|
||||
|
||||
case R.id.conversation_video_call:
|
||||
|
|
|
@ -330,6 +330,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
} else {
|
||||
roomType = Room.RoomType.ROOM_GROUP_CALL;
|
||||
}
|
||||
|
||||
bundle.putParcelable(BundleKeys.KEY_CONVERSATION_TYPE, Parcels.wrap(roomType));
|
||||
ArrayList<String> userIds = new ArrayList<>();
|
||||
Set<Integer> selectedPositions = adapter.getSelectedPositionsAsSet();
|
||||
|
@ -789,9 +790,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||
bottomSheet.setOnCancelListener(null);
|
||||
bottomSheet.cancel();
|
||||
|
||||
if (bottomSheetLockEvent.isDismissView()) {
|
||||
new Handler().postDelayed(() -> getRouter().popCurrentController(), 100);
|
||||
}
|
||||
}, bottomSheetLockEvent.getDelay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -500,7 +500,6 @@ public class OperationsMenuController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onNext(AddParticipantOverall addParticipantOverall) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -515,7 +514,7 @@ public class OperationsMenuController extends BaseController {
|
|||
}
|
||||
|
||||
if (localInvitedUsers.size() == 0) {
|
||||
initiateConversation(false, null);
|
||||
initiateConversation(true, null);
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
@ -544,15 +543,15 @@ public class OperationsMenuController extends BaseController {
|
|||
|
||||
Intent conversationIntent = new Intent(getActivity(), CallActivity.class);
|
||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, room.getToken());
|
||||
bundle.putString(BundleKeys.KEY_ROOM_ID, room.getToken());
|
||||
bundle.putString(BundleKeys.KEY_ROOM_ID, room.getRoomId());
|
||||
bundle.putString(BundleKeys.KEY_CONVERSATION_NAME, room.getDisplayName());
|
||||
bundle.putParcelable(BundleKeys.KEY_ACTIVE_CONVERSATION, Parcels.wrap(call));
|
||||
|
||||
conversationIntent.putExtras(bundle);
|
||||
getParentController().getParentController().getRouter().pushController((RouterTransaction.with(
|
||||
new ChatController(bundle)).pushChangeHandler(
|
||||
new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler())));
|
||||
|
||||
getParentController().getRouter().pushController(RouterTransaction.with(new ChatController(bundle))
|
||||
.pushChangeHandler(new HorizontalChangeHandler())
|
||||
.popChangeHandler(new HorizontalChangeHandler()));
|
||||
|
||||
} else {
|
||||
initiateCall();
|
||||
|
|
|
@ -24,6 +24,9 @@ import com.bluelinelabs.logansquare.annotation.JsonField;
|
|||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
||||
import com.nextcloud.talk.models.json.rooms.RoomsOCS;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonObject
|
||||
public class AddParticipantOverall {
|
||||
@JsonField(name = "ocs")
|
||||
|
|
Loading…
Reference in a new issue