Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
fix Fragment AddFragment{c7ac6c1} (883f412c-d568-47ba-9204-5f05a5dd3b5a) not attached to a context on Add
  • Loading branch information
tsynik committed May 11, 2024
1 parent 51dd4d7 commit d64376f
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,12 @@ class AddFragment : TSFragment() {
try {
val category = it.Categories.normalize()
val torrent = addTorrent("", it.Magnet, it.Title, "", category, "", true)
torrent?.let { App.toast("${getString(R.string.stat_string_added)}: ${it.title}") } ?: App.toast(getString(R.string.error_add_torrent))
torrent?.let { App.toast("${App.context.getString(R.string.stat_string_added)}: ${it.title}", true) } ?: App.toast(R.string.error_add_torrent)
} catch (e: Exception) {
e.printStackTrace()
App.toast(e.message ?: getString(R.string.error_add_torrent))
App.toast(e.message ?: App.context.getString(R.string.error_add_torrent))
}
popBackStackFragment()
}
popBackStackFragment()
}
torrsAdapter.onLongClick = {
lifecycleScope.launch(Dispatchers.IO) {
Expand Down

0 comments on commit d64376f

Please sign in to comment.