|
|
@ -29,8 +29,8 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat |
|
|
|
} ?: let { |
|
|
|
} ?: let { |
|
|
|
bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1 |
|
|
|
bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1 |
|
|
|
} |
|
|
|
} |
|
|
|
sourceLiveData.postValue(bookSource) |
|
|
|
|
|
|
|
App.db.bookSourceDao().insert(bookSource) |
|
|
|
App.db.bookSourceDao().insert(bookSource) |
|
|
|
|
|
|
|
sourceLiveData.postValue(bookSource) |
|
|
|
}.onFinally { |
|
|
|
}.onFinally { |
|
|
|
finally?.let { it() } |
|
|
|
finally?.let { it() } |
|
|
|
} |
|
|
|
} |
|
|
|