3530: Provide a help text on the empty conversations view (#3531)

Fixes #3530
This commit is contained in:
Levi Bard 2023-09-05 09:34:50 +02:00 committed by GitHub
commit 5f0f4b82b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View file

@ -192,6 +192,7 @@ class ListsActivity : BaseActivity(), Injectable, HasAndroidInjector {
R.string.message_empty, R.string.message_empty,
null null
) )
binding.messageView.showHelp(R.string.help_empty_lists)
} else { } else {
binding.messageView.hide() binding.messageView.hide()
} }

View file

@ -134,6 +134,7 @@ class ConversationsFragment :
if (loadState.append is LoadState.NotLoading && loadState.source.refresh is LoadState.NotLoading) { if (loadState.append is LoadState.NotLoading && loadState.source.refresh is LoadState.NotLoading) {
binding.statusView.show() binding.statusView.show()
binding.statusView.setup(R.drawable.elephant_friend_empty, R.string.message_empty, null) binding.statusView.setup(R.drawable.elephant_friend_empty, R.string.message_empty, null)
binding.statusView.showHelp(R.string.help_empty_conversations)
} }
} }
is LoadState.Error -> { is LoadState.Error -> {

View file

@ -61,6 +61,7 @@ class BackgroundMessageView @JvmOverloads constructor(
binding.imageView.setImageResource(imageRes) binding.imageView.setImageResource(imageRes)
binding.button.setOnClickListener(clickListener) binding.button.setOnClickListener(clickListener)
binding.button.visible(clickListener != null) binding.button.visible(clickListener != null)
binding.helpText.visible(false)
} }
fun showHelp(@StringRes helpRes: Int) { fun showHelp(@StringRes helpRes: Int) {

View file

@ -813,6 +813,18 @@
you follow.\n\nTo explore accounts you can either discover them in one of the other timelines. you follow.\n\nTo explore accounts you can either discover them in one of the other timelines.
For example the local timeline of your instance [iconics gmd_group]. Or you can search them For example the local timeline of your instance [iconics gmd_group]. Or you can search them
by name [iconics gmd_search]; for example search for Tusky to find our Mastodon account.</string> by name [iconics gmd_search]; for example search for Tusky to find our Mastodon account.</string>
<string name="help_empty_conversations">Here are your <b>private messages</b>; sometimes called conversations or direct messages (DM).
\n\nPrivate messages are created by setting the visibility [iconics gmd_public] of a post to [iconics gmd_mail] <i>Direct</i> and
mentioning one or more users in the text.
\n\nFor example you can start on the profile view of an account and tap the create button [iconics gmd_edit] and change the visibility.
</string>
<string name="help_empty_lists">This is your <b>lists view</b>. You can define a number of private lists and add accounts to that.
\n\n
NOTE that you can only add accounts you follow to your lists.
\n\n
These lists can be used as a tab in Account preferences [iconics gmd_account_circle] [iconics gmd_navigate_next] Tabs.
</string>
<string name="load_newest_notifications">Load newest notifications</string> <string name="load_newest_notifications">Load newest notifications</string>
<string name="about_copy">Copy version and device information</string> <string name="about_copy">Copy version and device information</string>
<string name="about_copied">Copied version and device information</string> <string name="about_copied">Copied version and device information</string>