mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 09:13:00 +00:00 
			
		
		
		
	Merge pull request #11928 from LeMeuble/bug-checksum-deleted-file
Fix the issue of getting the checksum of a removed file
This commit is contained in:
		@@ -664,6 +664,13 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
 | 
			
		||||
                return true;
 | 
			
		||||
            case R.id.md5:
 | 
			
		||||
            case R.id.sha1:
 | 
			
		||||
                final StoredFileHelper storage = h.item.mission.storage;
 | 
			
		||||
                if (!storage.existsAsFile()) {
 | 
			
		||||
                    Toast.makeText(mContext, R.string.missing_file, Toast.LENGTH_SHORT).show();
 | 
			
		||||
                    mDeleter.append(h.item.mission);
 | 
			
		||||
                    applyChanges();
 | 
			
		||||
                    return true;
 | 
			
		||||
                }
 | 
			
		||||
                final NotificationManager notificationManager
 | 
			
		||||
                        = ContextCompat.getSystemService(mContext, NotificationManager.class);
 | 
			
		||||
                final NotificationCompat.Builder progressNotificationBuilder
 | 
			
		||||
@@ -678,7 +685,6 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
 | 
			
		||||
 | 
			
		||||
                notificationManager.notify(HASH_NOTIFICATION_ID, progressNotificationBuilder
 | 
			
		||||
                        .build());
 | 
			
		||||
                final StoredFileHelper storage = h.item.mission.storage;
 | 
			
		||||
                compositeDisposable.add(
 | 
			
		||||
                        Observable.fromCallable(() -> Utility.checksum(storage, id))
 | 
			
		||||
                                .subscribeOn(Schedulers.computation())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user