mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Added success toasts
This commit is contained in:
		 Isira Seneviratne
					Isira Seneviratne
				
			
				
					committed by
					
						 Profpatsch
						Profpatsch
					
				
			
			
				
	
			
			
			 Profpatsch
						Profpatsch
					
				
			
						parent
						
							fc7f1b0af0
						
					
				
				
					commit
					c0965a42a1
				
			| @@ -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() | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user