mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-25 08:26:57 +00:00
Added success toasts
This commit is contained in:
parent
6046e9642b
commit
d4c4710b2d
@ -58,6 +58,12 @@ class SubscriptionExportWorker(
|
||||
Log.i(TAG, "Exported $qty subscriptions")
|
||||
}
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast
|
||||
.makeText(applicationContext, R.string.export_complete_toast, Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
|
||||
Result.success()
|
||||
} catch (e: Exception) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
|
@ -6,6 +6,7 @@ import android.content.pm.ServiceInfo
|
||||
import android.os.Build
|
||||
import android.util.Pair
|
||||
import android.webkit.MimeTypeMap
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.net.toUri
|
||||
import androidx.work.CoroutineWorker
|
||||
@ -98,6 +99,12 @@ class SubscriptionImportWorker(
|
||||
setForeground(createForegroundInfo(createNotification(title, null, index, qty)))
|
||||
}
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast
|
||||
.makeText(applicationContext, R.string.import_complete_toast, Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user