mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 00:47:00 +01:00
feat(core,app,android,ios): finish adding a first share where it pays off
- A link with a password of its own, added without one, now fails as "This link has a password of its own" instead of the handshake's refusal. The link's public flags are only asked for after a refusal. The desktop form turns its password toggle on. - After the first share is added, all three clients go to the library. While that share is being listed, the empty library says so instead of offering to add a share. - The desktop library offers posters and synopses once there is a library to put them on. The offer says what is sent, links to Settings, never turns anything on, and "Not now" is remembered.
This commit is contained in:
1 parent
0f96cc4514
commit
89e55aac12
11 files changed
+150
-10
No files matched your search
@@ -188,6 +188,12 @@ internal fun LibraryScreen(
|
||||
"Nothing matches",
|
||||
"No title in the library is called “${state.query.trim()}”.",
|
||||
)
|
||||
// A share just added: say it is being looked through, rather
|
||||
// than offer to add the one that is already filling the page.
|
||||
state.titles.isEmpty() && state.activity != null -> EmptyState(
|
||||
"Looking through the share",
|
||||
"${state.activity} Its titles appear here once it has been listed.",
|
||||
)
|
||||
state.titles.isEmpty() -> EmptyState(
|
||||
"Your library is empty",
|
||||
"Add a Proton Drive share link, and everything playable behind it shows up here.",
|
||||
|
||||
@@ -279,7 +279,14 @@ fun ProtonStreamApp(
|
||||
}
|
||||
Destination.Shares -> SharesScreen(
|
||||
state.shares,
|
||||
model::addShare,
|
||||
{ name, url, password ->
|
||||
// The first share is the library: watch it fill
|
||||
// rather than stay on a form that has done its job.
|
||||
val first = state.titles.isEmpty()
|
||||
model.addShare(name, url, password).also { refusal ->
|
||||
if (refusal == null && first) destination = Destination.Library
|
||||
}
|
||||
},
|
||||
model::repairShare,
|
||||
model::refreshShare,
|
||||
model::removeShare,
|
||||
|
||||
Reference in new issue
Block a user