mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-10 04:38:33 +00:00
Remove some dead code.
This commit is contained in:
parent
df9186827c
commit
3d5cfb3c74
@ -33,8 +33,6 @@ public class RevealableMessageView extends LinearLayout {
|
||||
private ImageView icon;
|
||||
private ProgressWheel progress;
|
||||
private TextView text;
|
||||
private Handler handler;
|
||||
private Runnable updateRunnable;
|
||||
private Attachment attachment;
|
||||
private int unopenedForegroundColor;
|
||||
private int openedForegroundColor;
|
||||
@ -66,7 +64,6 @@ public class RevealableMessageView extends LinearLayout {
|
||||
this.icon = findViewById(R.id.revealable_icon);
|
||||
this.progress = findViewById(R.id.revealable_progress);
|
||||
this.text = findViewById(R.id.revealable_text);
|
||||
this.handler = new Handler();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -96,7 +93,6 @@ public class RevealableMessageView extends LinearLayout {
|
||||
public void setMessage(@NonNull MmsMessageRecord message) {
|
||||
this.attachment = message.getSlideDeck().getThumbnailSlide() != null ? message.getSlideDeck().getThumbnailSlide().asAttachment() : null;
|
||||
|
||||
clearUpdateRunnable();
|
||||
presentMessage(message);
|
||||
}
|
||||
|
||||
@ -135,7 +131,6 @@ public class RevealableMessageView extends LinearLayout {
|
||||
text.setText(R.string.RevealableMessageView_viewed);
|
||||
icon.setImageResource(R.drawable.ic_play_outline_24);
|
||||
progress.setVisibility(GONE);
|
||||
clearUpdateRunnable();
|
||||
}
|
||||
|
||||
text.setTextColor(foregroundColor);
|
||||
@ -151,13 +146,6 @@ public class RevealableMessageView extends LinearLayout {
|
||||
return attachment.getTransferState() == AttachmentDatabase.TRANSFER_PROGRESS_STARTED;
|
||||
}
|
||||
|
||||
private void clearUpdateRunnable() {
|
||||
if (updateRunnable != null) {
|
||||
handler.removeCallbacks(updateRunnable);
|
||||
updateRunnable = null;
|
||||
}
|
||||
}
|
||||
|
||||
private @NonNull String formatFileSize(@NonNull MmsMessageRecord messageRecord) {
|
||||
if (messageRecord.getSlideDeck().getThumbnailSlide() == null) return "";
|
||||
|
||||
|
@ -47,15 +47,4 @@ public class RevealableUtil {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasStarted(@Nullable MmsMessageRecord record) {
|
||||
return record != null && record.getRevealStartTime() != 0;
|
||||
}
|
||||
|
||||
public static boolean hasMedia(@Nullable MmsMessageRecord record) {
|
||||
return record != null &&
|
||||
record.getSlideDeck().getThumbnailSlide() != null &&
|
||||
record.getSlideDeck().getThumbnailSlide().getUri() != null &&
|
||||
record.getSlideDeck().getThumbnailSlide().getTransferState() == AttachmentDatabase.TRANSFER_PROGRESS_DONE;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user