mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Fix crashing bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
a2de1bfd9d
commit
75fb4cbea1
@ -52,6 +52,7 @@ import com.nextcloud.talk.models.json.participants.ParticipantsOverall;
|
||||
import com.nextcloud.talk.models.json.rooms.Room;
|
||||
import com.nextcloud.talk.models.json.rooms.RoomsOverall;
|
||||
import com.nextcloud.talk.utils.ApiUtils;
|
||||
import com.nextcloud.talk.utils.MagicFlipView;
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys;
|
||||
import com.nextcloud.talk.utils.glide.GlideApp;
|
||||
import com.nextcloud.talk.utils.preferences.AppPreferences;
|
||||
@ -88,6 +89,13 @@ public class CallNotificationController extends BaseController {
|
||||
|
||||
@BindView(R.id.avatarImageView)
|
||||
ImageView avatarImageView;
|
||||
|
||||
@BindView(R.id.callAnswerVoiceOnlyView)
|
||||
MagicFlipView callAnswerVoiceOnlyView;
|
||||
|
||||
@BindView(R.id.callAnswerCameraView)
|
||||
MagicFlipView callAnswerCameraView;
|
||||
|
||||
private List<Disposable> disposablesList = new ArrayList<>();
|
||||
private Bundle originalBundle;
|
||||
private String roomId;
|
||||
@ -114,6 +122,11 @@ public class CallNotificationController extends BaseController {
|
||||
return inflater.inflate(R.layout.controller_call_notification, container, false);
|
||||
}
|
||||
|
||||
private void showAnswerControls() {
|
||||
callAnswerCameraView.setVisibility(View.VISIBLE);
|
||||
callAnswerVoiceOnlyView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@OnClick(R.id.callControlHangupView)
|
||||
void hangup() {
|
||||
leavingScreen = true;
|
||||
@ -212,6 +225,7 @@ public class CallNotificationController extends BaseController {
|
||||
conversationNameTextView.setText(room.getDisplayName());
|
||||
loadAvatar();
|
||||
checkIfAnyParticipantsRemainInRoom();
|
||||
showAnswerControls();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -63,14 +63,17 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.nextcloud.talk.utils.MagicFlipView
|
||||
android:id="@+id/callAnswerVoiceOnlyView"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="24dp"
|
||||
android:visibility="gone"
|
||||
app:checked="false"
|
||||
app:enableInitialAnimation="false"
|
||||
app:frontBackgroundColor="@color/colorPrimary"
|
||||
@ -81,12 +84,12 @@
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="24dp"
|
||||
android:visibility="gone"
|
||||
app:checked="false"
|
||||
app:enableInitialAnimation="false"
|
||||
app:frontBackgroundColor="@color/colorPrimary"
|
||||
app:frontImage="@drawable/ic_videocam_white_24px"/>
|
||||
|
||||
|
||||
<com.nextcloud.talk.utils.MagicFlipView
|
||||
android:id="@+id/callControlHangupView"
|
||||
android:layout_width="60dp"
|
||||
|
Loading…
Reference in New Issue
Block a user