mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 07:28:27 +00:00
WIP
This commit is contained in:
parent
9776420135
commit
23336cc2ea
@ -89,7 +89,6 @@
|
|||||||
android:layout_width="210dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
||||||
android:layout_marginBottom="@dimen/message_bubble_collapsed_footer_padding"
|
|
||||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
||||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
|
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
|
||||||
|
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
android:id="@+id/audio_view"
|
android:id="@+id/audio_view"
|
||||||
android:layout_width="210dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:foregroundTintColor="@color/grey_500"
|
app:foregroundTintColor="@color/black"
|
||||||
app:backgroundTintColor="@color/white"
|
app:backgroundTintColor="@color/white"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
@ -24,7 +24,6 @@ import com.pnikosis.materialishprogress.ProgressWheel;
|
|||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
import network.loki.messenger.R;
|
|
||||||
import org.thoughtcrime.securesms.audio.AudioSlidePlayer;
|
import org.thoughtcrime.securesms.audio.AudioSlidePlayer;
|
||||||
import org.thoughtcrime.securesms.database.AttachmentDatabase;
|
import org.thoughtcrime.securesms.database.AttachmentDatabase;
|
||||||
import org.thoughtcrime.securesms.events.PartProgressEvent;
|
import org.thoughtcrime.securesms.events.PartProgressEvent;
|
||||||
@ -35,6 +34,8 @@ import org.thoughtcrime.securesms.mms.SlideClickListener;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import network.loki.messenger.R;
|
||||||
|
|
||||||
|
|
||||||
public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener {
|
public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener {
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ import org.thoughtcrime.securesms.recipients.Recipient;
|
|||||||
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
|
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
|
||||||
import org.thoughtcrime.securesms.stickers.StickerUrl;
|
import org.thoughtcrime.securesms.stickers.StickerUrl;
|
||||||
import org.thoughtcrime.securesms.util.DateUtils;
|
import org.thoughtcrime.securesms.util.DateUtils;
|
||||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
|
||||||
import org.thoughtcrime.securesms.util.GroupUtil;
|
import org.thoughtcrime.securesms.util.GroupUtil;
|
||||||
import org.thoughtcrime.securesms.util.LongClickCopySpan;
|
import org.thoughtcrime.securesms.util.LongClickCopySpan;
|
||||||
import org.thoughtcrime.securesms.util.LongClickMovementMethod;
|
import org.thoughtcrime.securesms.util.LongClickMovementMethod;
|
||||||
@ -367,15 +366,7 @@ public class ConversationItem extends LinearLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setAudioViewTint(MessageRecord messageRecord, Recipient recipient) {
|
private void setAudioViewTint(MessageRecord messageRecord, Recipient recipient) {
|
||||||
if (messageRecord.isOutgoing()) {
|
audioViewStub.get().setTint(Color.WHITE, getResources().getColor(R.color.action_bar_background));
|
||||||
if (DynamicTheme.LIGHT.equals(TextSecurePreferences.getTheme(context))) {
|
|
||||||
audioViewStub.get().setTint(getContext().getResources().getColor(R.color.core_grey_60), defaultBubbleColor);
|
|
||||||
} else {
|
|
||||||
audioViewStub.get().setTint(Color.WHITE, defaultBubbleColor);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
audioViewStub.get().setTint(Color.WHITE, recipient.getColor().toConversationColor(context));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setInteractionState(MessageRecord messageRecord, boolean pulseHighlight) {
|
private void setInteractionState(MessageRecord messageRecord, boolean pulseHighlight) {
|
||||||
@ -470,6 +461,10 @@ public class ConversationItem extends LinearLayout
|
|||||||
bodyText.setClickable(false);
|
bodyText.setClickable(false);
|
||||||
bodyText.setFocusable(false);
|
bodyText.setFocusable(false);
|
||||||
bodyText.setTextSize(TypedValue.COMPLEX_UNIT_SP, TextSecurePreferences.getMessageBodyTextSize(context));
|
bodyText.setTextSize(TypedValue.COMPLEX_UNIT_SP, TextSecurePreferences.getMessageBodyTextSize(context));
|
||||||
|
bodyBubble.setPadding(0, 0, 0, 0);
|
||||||
|
if (messageRecord.isOutgoing() && !(isCaptionlessMms(messageRecord) && !hasAudio(messageRecord))) {
|
||||||
|
bodyBubble.setPadding(0, 0, 0, (int) getResources().getDimension(R.dimen.medium_spacing));
|
||||||
|
}
|
||||||
if (isCaptionlessMms(messageRecord)) {
|
if (isCaptionlessMms(messageRecord)) {
|
||||||
bodyText.setVisibility(View.GONE);
|
bodyText.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user