mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
Fix issue of checksum for removed file
This commit is contained in:
parent
f7d0fd545d
commit
658ddfc921
1 changed files with 7 additions and 1 deletions
|
@ -664,6 +664,13 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
|
||||||
return true;
|
return true;
|
||||||
case R.id.md5:
|
case R.id.md5:
|
||||||
case R.id.sha1:
|
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
|
final NotificationManager notificationManager
|
||||||
= ContextCompat.getSystemService(mContext, NotificationManager.class);
|
= ContextCompat.getSystemService(mContext, NotificationManager.class);
|
||||||
final NotificationCompat.Builder progressNotificationBuilder
|
final NotificationCompat.Builder progressNotificationBuilder
|
||||||
|
@ -678,7 +685,6 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
|
||||||
|
|
||||||
notificationManager.notify(HASH_NOTIFICATION_ID, progressNotificationBuilder
|
notificationManager.notify(HASH_NOTIFICATION_ID, progressNotificationBuilder
|
||||||
.build());
|
.build());
|
||||||
final StoredFileHelper storage = h.item.mission.storage;
|
|
||||||
compositeDisposable.add(
|
compositeDisposable.add(
|
||||||
Observable.fromCallable(() -> Utility.checksum(storage, id))
|
Observable.fromCallable(() -> Utility.checksum(storage, id))
|
||||||
.subscribeOn(Schedulers.computation())
|
.subscribeOn(Schedulers.computation())
|
||||||
|
|
Loading…
Add table
Reference in a new issue