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:
@@ -56,15 +56,15 @@ public final class MainActivity extends BaseActivity {
|
||||
header.setPadding(Ui.dp(this, 24), Ui.dp(this, 8), Ui.dp(this, 8), Ui.dp(this, 8));
|
||||
title = Ui.bold(Ui.text(this, "Messages", Ui.T_TITLE, Ui.TEXT));
|
||||
header.addView(title, new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1));
|
||||
TextView compose = Ui.headerButton(this, "✎");
|
||||
TextView compose = Ui.headerButton(this, Glyph.Kind.COMPOSE);
|
||||
compose.setOnClickListener(v -> startActivity(new Intent(this, NewChatActivity.class)));
|
||||
TextView archive = Ui.headerButton(this, "🗄");
|
||||
TextView archive = Ui.headerButton(this, Glyph.Kind.ARCHIVE);
|
||||
archive.setOnClickListener(v -> {
|
||||
archived = !archived;
|
||||
hideSearch = true;
|
||||
changed();
|
||||
});
|
||||
TextView settings = Ui.headerButton(this, "⚙");
|
||||
TextView settings = Ui.headerButton(this, Glyph.Kind.GEAR);
|
||||
settings.setOnClickListener(v -> startActivity(new Intent(this, SettingsActivity.class)));
|
||||
header.addView(compose);
|
||||
header.addView(archive);
|
||||
@@ -172,13 +172,13 @@ public final class MainActivity extends BaseActivity {
|
||||
LinearLayout box = new LinearLayout(this);
|
||||
box.setPadding(Ui.dp(this, 20), Ui.dp(this, 6), Ui.dp(this, 20), Ui.dp(this, 10));
|
||||
search = new EditText(this);
|
||||
search.setHint("🔍 Search");
|
||||
search.setHintTextColor(Ui.FAINT);
|
||||
search.setHint("Search");
|
||||
search.setHintTextColor(Ui.MUTED);
|
||||
search.setTextColor(Ui.TEXT);
|
||||
search.setTextSize(TypedValue.COMPLEX_UNIT_SP, Ui.T_SMALL);
|
||||
search.setSingleLine();
|
||||
search.setImeOptions(EditorInfo.IME_ACTION_SEARCH | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
search.setBackground(Ui.round(Ui.INPUT, Ui.dp(this, 30)));
|
||||
search.setBackground(Ui.input(this, 30));
|
||||
search.setPadding(Ui.dp(this, 24), Ui.dp(this, 12), Ui.dp(this, 24), Ui.dp(this, 12));
|
||||
search.setOnEditorActionListener((v, action, e) -> {
|
||||
hideKeyboard();
|
||||
@@ -411,7 +411,8 @@ public final class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public void reveal(boolean rightward) {
|
||||
boolean unread = conv.unread > 0 || conv.markedUnread;
|
||||
under.setText(rightward ? (conv.archived ? "↩ Unarchive" : "🗄 Archive") : unread ? "✓ Read" : "✉ Unread");
|
||||
under.setText(rightward ? (conv.archived ? "Unarchive" : "Archive") : unread ? "Read" : "Unread");
|
||||
Ui.glyph(under, rightward ? (conv.archived ? Glyph.Kind.UNARCHIVE : Glyph.Kind.ARCHIVE) : unread ? Glyph.Kind.CHECK : Glyph.Kind.MAIL, false);
|
||||
under.setGravity(Gravity.CENTER_VERTICAL | (rightward ? Gravity.START : Gravity.END));
|
||||
}
|
||||
|
||||
@@ -426,7 +427,7 @@ public final class MainActivity extends BaseActivity {
|
||||
time.setText(Ui.shortTime(ctx, c.lastTs));
|
||||
String reaction = Reactions.preview(c.lastBody);
|
||||
String body = reaction != null ? reaction : c.lastBody == null ? "" : c.lastBody.replaceAll("\\s+", " ").trim();
|
||||
if (body.isEmpty() && c.lastMediaJson != null) body = "📷 Photo";
|
||||
if (body.isEmpty() && c.lastMediaJson != null) body = "Photo";
|
||||
String who = "out".equals(c.lastDirection) ? "You: " : group && c.lastSender != null ? Contacts.firstName(ctx, c.lastSender) + ": " : "";
|
||||
preview.setText(who + body);
|
||||
boolean unread = c.unread > 0 || c.markedUnread;
|
||||
|
||||
Reference in New Issue
Block a user