mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Deleted unused CollectionTask.AddNote
Last usage of this class has been removed in #11952. So it is being used no more.
This commit is contained in:
parent
233b88fe6f
commit
0a6c49f7b5
@ -161,20 +161,6 @@ open class CollectionTask<Progress, Result>(val task: TaskDelegateBase<Progress,
|
||||
listener?.onCancelled()
|
||||
}
|
||||
|
||||
@KotlinCleanup("non-null return")
|
||||
class AddNote(private val note: Note) : TaskDelegate<Void, Int?>() {
|
||||
override fun task(col: Collection, collectionTask: ProgressSenderAndCancelListener<Void>) = try {
|
||||
Timber.d("doInBackgroundAddNote")
|
||||
col.db.executeInTransaction {
|
||||
col.addNote(note, Models.AllowEmpty.ONLY_CLOZE)
|
||||
}
|
||||
} catch (e: RuntimeException) {
|
||||
Timber.e(e, "doInBackgroundAddNote - RuntimeException on adding note")
|
||||
CrashReportService.sendExceptionReport(e, "doInBackgroundAddNote")
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
class UpdateNote(
|
||||
private val editCard: Card,
|
||||
val isFromReviewer: Boolean,
|
||||
|
Loading…
Reference in New Issue
Block a user