This commit is contained in:
ligi 2016-04-07 23:24:19 +02:00
parent aafcb755c7
commit d38774cda0
4 changed files with 1 additions and 12 deletions

View file

@ -16,10 +16,6 @@ class FixedPassListPassStore(private val passes: List<Pass>) : PassStore {
return@lazy hashMap
}
override fun deleteCacheForId(id: String) {
}
override fun getPassbookForId(id: String): Pass? {
return passMap[id]
}

View file

@ -25,10 +25,6 @@ class AndroidFileSystemPassStore(private val context: Context, settings: Setting
FileBackedPassClassifier(classificationFile, this, moshi)
}
override fun deleteCacheForId(id: String) {
}
override fun save(pass: Pass) {
val jsonAdapter = moshi.adapter(PassImpl::class.java)

View file

@ -7,8 +7,6 @@ interface PassStore {
fun save(pass: Pass)
fun deleteCacheForId(id: String)
fun getPassbookForId(id: String): Pass?
fun deletePassWithId(id: String): Boolean

View file

@ -213,9 +213,8 @@ public class PassViewActivityBase extends PassAndroidActivity {
}
dlg.dismiss();
if (!optionalPass.getId().equals(uuid)) {
passStore.deletePassWithId(optionalPass.getId());
passStore.deletePassWithId(uuid);
}
passStore.deleteCacheForId(uuid);
final Pass newPass = passStore.getPassbookForId(
uuid);
passStore.setCurrentPass(newPass);