mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-18 13:49:15 -04:00
Move TaskHandler to ViewModel
This should make it possible to properly cancel the running barcode generation threads on rotation and prevent CPU rising on many rotations.
This commit is contained in:
@@ -4,11 +4,14 @@ import android.net.Uri
|
||||
import androidx.lifecycle.ViewModel
|
||||
import protect.card_locker.LoyaltyCard
|
||||
import protect.card_locker.LoyaltyCardField
|
||||
import protect.card_locker.async.TaskHandler
|
||||
|
||||
class LoyaltyCardEditActivityViewModel : ViewModel() {
|
||||
var initialized: Boolean = false
|
||||
var hasChanged: Boolean = false
|
||||
|
||||
var taskHandler: TaskHandler = TaskHandler();
|
||||
|
||||
var addGroup: String? = null
|
||||
var openSetIconMenu: Boolean = false
|
||||
var loyaltyCardId: Int = 0
|
||||
|
||||
Reference in New Issue
Block a user