feat: implement photo albums (media groups) and persist account selection
Group photos with shared media_album_id into single album bubbles with grid layout (up to 3x cols). Album navigation treats grouped photos as one unit (j/k skip entire album). Persist selected account to accounts.toml so it survives app restart. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
tests/snapshots/messages__album_incoming.snap
Normal file
28
tests/snapshots/messages__album_incoming.snap
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
source: tests/messages.rs
|
||||
expression: output
|
||||
---
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│👤 Mom │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ──────── 02.01.2022 ──────── │
|
||||
│ │
|
||||
│Alice ──────────────── │
|
||||
│ (14:33) 📷 [Фото] │
|
||||
│ (14:33) Caption for album │
|
||||
│ (14:33) 📷 [Фото] │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│> Press i to type... │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
28
tests/snapshots/messages__album_outgoing.snap
Normal file
28
tests/snapshots/messages__album_outgoing.snap
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
source: tests/messages.rs
|
||||
expression: output
|
||||
---
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│👤 Mom │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ──────── 02.01.2022 ──────── │
|
||||
│ │
|
||||
│ Вы ──────────────── │
|
||||
│ 📷 [Фото] (14:33 ✓✓)│
|
||||
│ My vacation photos (14:33 ✓✓) │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│> Press i to type... │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
28
tests/snapshots/messages__album_selected.snap
Normal file
28
tests/snapshots/messages__album_selected.snap
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
source: tests/messages.rs
|
||||
expression: output
|
||||
---
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│👤 Mom │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ──────── 02.01.2022 ──────── │
|
||||
│ │
|
||||
│Alice ──────────────── │
|
||||
│ (14:33) 📷 [Фото] │
|
||||
│▶ (14:33) 📷 [Фото] │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌ Выбор сообщения ─────────────────────────────────────────────────────────────┐
|
||||
│↑↓ · r ответ · f переслать · y копир. · d удалить · Esc │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
28
tests/snapshots/messages__album_with_regular_messages.snap
Normal file
28
tests/snapshots/messages__album_with_regular_messages.snap
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
source: tests/messages.rs
|
||||
expression: output
|
||||
---
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│👤 Group Chat │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ──────── 02.01.2022 ──────── │
|
||||
│ │
|
||||
│Alice ──────────────── │
|
||||
│ (14:33) Regular message before │
|
||||
│ (14:33) 📷 [Фото] │
|
||||
│ (14:33) Album caption │
|
||||
│ (14:33) Regular message after │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│> Press i to type... │
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
Reference in New Issue
Block a user