v0.6.0: bubble for Android 0.6.0 — the house look on the Rabbit, and a stretchy pull-to-refresh that pops
Desktop: Signal vibes or travewave, chosen in Preferences → Appearance. Rabbit: white on pure black, 22/28/32 sp text, outlined buttons and dim-edged text boxes, and drawn icons instead of emoji (rabbit.html). Pulling the chat list further once the search box shows stretches a bubble that pops at the mark and starts the check, then a spinner until it's done.
This commit is contained in:
@@ -182,18 +182,17 @@ public final class ChatActivity extends BaseActivity {
|
||||
|
||||
LinearLayout row = new LinearLayout(this);
|
||||
row.setGravity(Gravity.BOTTOM);
|
||||
attach = Ui.headerButton(this, "📎");
|
||||
attach = Ui.headerButton(this, Glyph.Kind.ATTACH);
|
||||
attach.setOnTouchListener((v, e) -> attachTouch(e));
|
||||
input = new EditText(this);
|
||||
input.setHint("Message");
|
||||
input.setHintTextColor(Ui.FAINT);
|
||||
input.setHintTextColor(Ui.MUTED);
|
||||
input.setTextColor(Ui.TEXT);
|
||||
input.setTextSize(TypedValue.COMPLEX_UNIT_SP, Ui.T_BODY);
|
||||
input.setMaxLines(4);
|
||||
input.setBackground(Ui.round(Ui.INPUT, Ui.dp(this, 36)));
|
||||
input.setBackground(Ui.input(this, 36));
|
||||
input.setPadding(Ui.dp(this, 24), Ui.dp(this, 14), Ui.dp(this, 24), Ui.dp(this, 14));
|
||||
send = Ui.headerButton(this, "➤");
|
||||
send.setTextColor(Ui.ACCENT);
|
||||
send = Ui.headerButton(this, Glyph.Kind.SEND, Ui.ACCENT);
|
||||
send.setOnClickListener(v -> submit());
|
||||
row.addView(attach);
|
||||
row.addView(input, new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1));
|
||||
@@ -701,9 +700,9 @@ public final class ChatActivity extends BaseActivity {
|
||||
if (showSender) sender.setText(Contacts.name(c, msg.sender));
|
||||
body.setText(msg.body);
|
||||
body.setVisibility(msg.body.isEmpty() ? GONE : VISIBLE);
|
||||
String status = "pending".equals(msg.status) ? " 🕓" : "";
|
||||
meta.setText(Ui.timeOfDay(c, msg.ts) + status);
|
||||
meta.setText(Ui.timeOfDay(c, msg.ts));
|
||||
meta.setTextColor(out ? 0xB3FFFFFF : Ui.MUTED);
|
||||
Ui.glyph(meta, "pending".equals(msg.status) ? Glyph.Kind.CLOCK : null, true);
|
||||
failed.setVisibility("failed".equals(msg.status) ? VISIBLE : GONE);
|
||||
failed.setText("⚠ Not sent" + (msg.error != null ? ": " + msg.error : "") + " · tap to retry");
|
||||
List<Reactions.Reaction> rs = reactions.get(msg.id);
|
||||
@@ -727,14 +726,15 @@ public final class ChatActivity extends BaseActivity {
|
||||
int bw = w > 0 ? Math.round(w * scale) : Ui.dp(c, 200), bh = h > 0 ? Math.round(h * scale) : Ui.dp(c, 200);
|
||||
String mime = ref.optString("mime", "");
|
||||
if (mime.startsWith("audio/")) {
|
||||
TextView t = Ui.bold(Ui.text(c, ((id + "/" + index).equals(playing) ? "⏸" : "▶") + " Voice note",
|
||||
Ui.T_SMALL, Ui.TEXT));
|
||||
TextView t = Ui.bold(Ui.text(c, "Voice note", Ui.T_SMALL, Ui.TEXT));
|
||||
Ui.glyph(t, (id + "/" + index).equals(playing) ? Glyph.Kind.PAUSE : Glyph.Kind.PLAY, false);
|
||||
t.setPadding(0, Ui.dp(c, 10), Ui.dp(c, 20), Ui.dp(c, 10));
|
||||
t.setOnClickListener(v -> toggleAudio(id, index));
|
||||
return t;
|
||||
}
|
||||
if (!mime.isEmpty() && !mime.startsWith("image/")) {
|
||||
TextView t = Ui.text(c, mime.startsWith("video/") ? "🎥 Video" : "📎 Attachment", Ui.T_SMALL, Ui.TEXT);
|
||||
TextView t = Ui.text(c, mime.startsWith("video/") ? "Video" : "Attachment", Ui.T_SMALL, Ui.TEXT);
|
||||
Ui.glyph(t, mime.startsWith("video/") ? Glyph.Kind.VIDEO : Glyph.Kind.FILE, false);
|
||||
t.setPadding(0, Ui.dp(c, 6), 0, Ui.dp(c, 6));
|
||||
return t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user