Added some strings

This commit is contained in:
mjaillot 2021-03-26 17:51:42 +01:00
parent 3972ffd093
commit dce7c45e21
4 changed files with 9 additions and 4 deletions

View File

@ -67,7 +67,8 @@ internal fun <T: Any> initAdapter(
&& loadState.append is LoadState.NotLoading
&& loadState.append.endOfPaginationReached){
progressBar.isVisible = false
showError(motionLayout = motionLayout, errorLayout = errorLayout, errorText = "Nothing to see here :(")
showError(motionLayout = motionLayout, errorLayout = errorLayout,
errorText = errorLayout.root.context.getString(R.string.empty_feed))
}
}

View File

@ -26,10 +26,10 @@ class ProfilePagingSource(
prevKey = null,
nextKey = posts.lastOrNull()?.id
)
} catch (exception: IOException) {
LoadResult.Error(exception)
} catch (exception: HttpException) {
LoadResult.Error(exception)
} catch (exception: IOException) {
LoadResult.Error(exception)
}
}

View File

@ -17,6 +17,7 @@ import androidx.paging.PagingDataAdapter
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.snackbar.Snackbar
import com.h.pixeldroid.R
import com.h.pixeldroid.databinding.ActivityProfileBinding
import com.h.pixeldroid.databinding.FragmentProfilePostsBinding
@ -198,7 +199,8 @@ class ProfileActivity : BaseActivity() {
val url = "$domain/settings/home"
if(!openUrl(url)) {
Log.e("ProfileActivity", "Cannot open this link")
Snackbar.make(binding.root, getString(R.string.edit_link_failed),
Snackbar.LENGTH_LONG).show()
}
}

View File

@ -139,6 +139,8 @@ For more info about Pixelfed, you can check here: https://pixelfed.org"</string>
<item quantity="other">"%d\nFollowing"</item>
</plurals>
<string name="follow_status_failed">Could not get follow status</string>
<string name="edit_link_failed">Failed to open edit page</string>
<string name="empty_feed">Nothing to see here :(</string>
<string name="follow_button_failed">Could not display follow button</string>
<string name="follow_error">Could not follow</string>
<string name="action_not_allowed">This action is not allowed</string>