mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-10 21:28:34 +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 ImageView icon;
|
||||||
private ProgressWheel progress;
|
private ProgressWheel progress;
|
||||||
private TextView text;
|
private TextView text;
|
||||||
private Handler handler;
|
|
||||||
private Runnable updateRunnable;
|
|
||||||
private Attachment attachment;
|
private Attachment attachment;
|
||||||
private int unopenedForegroundColor;
|
private int unopenedForegroundColor;
|
||||||
private int openedForegroundColor;
|
private int openedForegroundColor;
|
||||||
@ -66,7 +64,6 @@ public class RevealableMessageView extends LinearLayout {
|
|||||||
this.icon = findViewById(R.id.revealable_icon);
|
this.icon = findViewById(R.id.revealable_icon);
|
||||||
this.progress = findViewById(R.id.revealable_progress);
|
this.progress = findViewById(R.id.revealable_progress);
|
||||||
this.text = findViewById(R.id.revealable_text);
|
this.text = findViewById(R.id.revealable_text);
|
||||||
this.handler = new Handler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -96,7 +93,6 @@ public class RevealableMessageView extends LinearLayout {
|
|||||||
public void setMessage(@NonNull MmsMessageRecord message) {
|
public void setMessage(@NonNull MmsMessageRecord message) {
|
||||||
this.attachment = message.getSlideDeck().getThumbnailSlide() != null ? message.getSlideDeck().getThumbnailSlide().asAttachment() : null;
|
this.attachment = message.getSlideDeck().getThumbnailSlide() != null ? message.getSlideDeck().getThumbnailSlide().asAttachment() : null;
|
||||||
|
|
||||||
clearUpdateRunnable();
|
|
||||||
presentMessage(message);
|
presentMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +131,6 @@ public class RevealableMessageView extends LinearLayout {
|
|||||||
text.setText(R.string.RevealableMessageView_viewed);
|
text.setText(R.string.RevealableMessageView_viewed);
|
||||||
icon.setImageResource(R.drawable.ic_play_outline_24);
|
icon.setImageResource(R.drawable.ic_play_outline_24);
|
||||||
progress.setVisibility(GONE);
|
progress.setVisibility(GONE);
|
||||||
clearUpdateRunnable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text.setTextColor(foregroundColor);
|
text.setTextColor(foregroundColor);
|
||||||
@ -151,13 +146,6 @@ public class RevealableMessageView extends LinearLayout {
|
|||||||
return attachment.getTransferState() == AttachmentDatabase.TRANSFER_PROGRESS_STARTED;
|
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) {
|
private @NonNull String formatFileSize(@NonNull MmsMessageRecord messageRecord) {
|
||||||
if (messageRecord.getSlideDeck().getThumbnailSlide() == null) return "";
|
if (messageRecord.getSlideDeck().getThumbnailSlide() == null) return "";
|
||||||
|
|
||||||
|
@ -47,15 +47,4 @@ public class RevealableUtil {
|
|||||||
return false;
|
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