mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Fix things
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
e514c24316
commit
48ff5247b0
@ -23,6 +23,7 @@ package com.nextcloud.talk.controllers;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.MediaPlayer;
|
||||
@ -441,8 +442,16 @@ public class CallNotificationController extends BaseController {
|
||||
constraintLayout.setBackground(new BitmapDrawable(resource));
|
||||
} else if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 201) {
|
||||
Palette palette = Palette.from(resource).generate();
|
||||
constraintLayout.setBackgroundColor(palette.getDominantColor(
|
||||
getResources().getColor(R.color.grey950)));
|
||||
int color = palette.getDominantColor(getResources().getColor(R.color.grey950));
|
||||
|
||||
if (color != getResources().getColor(R.color.grey950)) {
|
||||
float[] hsv = new float[3];
|
||||
Color.colorToHSV(color, hsv);
|
||||
hsv[2] *= 0.75f;
|
||||
color = Color.HSVToColor(hsv);
|
||||
}
|
||||
|
||||
constraintLayout.setBackgroundColor(color);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -266,7 +266,7 @@ public class PushUtils {
|
||||
ncApi.registerDeviceForNotificationsWithNextcloud(
|
||||
credentials,
|
||||
ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl()), queryMap)
|
||||
.blockingSubscribe(new Observer<PushRegistrationOverall>() {
|
||||
.subscribe(new Observer<PushRegistrationOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user