mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
Tint audio controls to be visible in dark theme
Fixes #4353 Closes #4466 // FREEBIE
This commit is contained in:
parent
b136fed6f7
commit
fb9ba8cb8d
3 changed files with 17 additions and 4 deletions
|
@ -63,6 +63,8 @@ import org.thoughtcrime.securesms.mms.SlideClickListener;
|
|||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
import org.thoughtcrime.securesms.util.DateUtils;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -231,7 +233,12 @@ public class ConversationItem extends LinearLayout
|
|||
if (messageRecord.isOutgoing()) {
|
||||
bodyBubble.getBackground().setColorFilter(defaultBubbleColor, PorterDuff.Mode.MULTIPLY);
|
||||
mediaThumbnail.setBackgroundColorHint(defaultBubbleColor);
|
||||
audioView.setTint(conversationRecipients.getColor().toConversationColor(context));
|
||||
|
||||
if (DynamicTheme.LIGHT.equals(TextSecurePreferences.getTheme(context))) {
|
||||
audioView.setTint(conversationRecipients.getColor().toConversationColor(context));
|
||||
} else {
|
||||
audioView.setTint(Color.WHITE);
|
||||
}
|
||||
} else {
|
||||
int color = recipient.getColor().toConversationColor(context);
|
||||
bodyBubble.getBackground().setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
|
|
|
@ -95,8 +95,11 @@ public class AudioSlidePlayer {
|
|||
Log.w(TAG, "onComplete");
|
||||
synchronized (AudioSlidePlayer.this) {
|
||||
mediaPlayer = null;
|
||||
audioAttachmentServer.stop();
|
||||
audioAttachmentServer = null;
|
||||
|
||||
if (audioAttachmentServer != null) {
|
||||
audioAttachmentServer.stop();
|
||||
audioAttachmentServer = null;
|
||||
}
|
||||
}
|
||||
|
||||
notifyOnStop();
|
||||
|
|
|
@ -7,6 +7,9 @@ import org.thoughtcrime.securesms.R;
|
|||
|
||||
public class DynamicTheme {
|
||||
|
||||
public static final String DARK = "dark";
|
||||
public static final String LIGHT = "light";
|
||||
|
||||
private int currentTheme;
|
||||
|
||||
public void onCreate(Activity activity) {
|
||||
|
@ -27,7 +30,7 @@ public class DynamicTheme {
|
|||
protected int getSelectedTheme(Activity activity) {
|
||||
String theme = TextSecurePreferences.getTheme(activity);
|
||||
|
||||
if (theme.equals("dark")) return R.style.TextSecure_DarkTheme;
|
||||
if (theme.equals(DARK)) return R.style.TextSecure_DarkTheme;
|
||||
|
||||
return R.style.TextSecure_LightTheme;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue