diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index ccad1f3d7..de8d5f271 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -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); diff --git a/src/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java b/src/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java index 9e2da7d8f..104cd11ee 100644 --- a/src/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java +++ b/src/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java @@ -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(); diff --git a/src/org/thoughtcrime/securesms/util/DynamicTheme.java b/src/org/thoughtcrime/securesms/util/DynamicTheme.java index b484656d2..9ee4e89db 100644 --- a/src/org/thoughtcrime/securesms/util/DynamicTheme.java +++ b/src/org/thoughtcrime/securesms/util/DynamicTheme.java @@ -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; }