receipt print animate re-scale
This commit is contained in:
parent
beb6ddcba8
commit
4884152faa
@ -6,4 +6,5 @@
|
||||
* "Enter Password" color to LegacyRed
|
||||
* Amount and Card Number show in signature pad
|
||||
* fixed recent transaction only working for top 3
|
||||
* routed to dashboard after printing receipt
|
||||
* routed to dashboard after printing receipt
|
||||
* receipt printing animation re-scale
|
||||
@ -44,9 +44,7 @@ import com.mob.utsmyanmar.ui.transaction_result.TransactionResultViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.utsmyanmar.paylibs.utils.POSUtil
|
||||
import com.utsmyanmar.paylibs.utils.PrintStatus
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
|
||||
private enum class ReceiptCopy(val label: String) {
|
||||
MERCHANT("MERCHANT COPY"),
|
||||
@ -72,10 +70,10 @@ fun PrintReceiptScreen(
|
||||
|
||||
suspend fun animatePrint() {
|
||||
receiptOffsetY.animateTo(
|
||||
targetValue = -1500f,
|
||||
animationSpec = tween(durationMillis = 5000, easing = FastOutSlowInEasing)
|
||||
targetValue = -1400f,
|
||||
animationSpec = tween(durationMillis = 4000, easing = FastOutSlowInEasing)
|
||||
)
|
||||
delay(1000.milliseconds)
|
||||
// delay(1000.milliseconds)
|
||||
receiptOffsetY.animateTo(
|
||||
targetValue = 0f,
|
||||
animationSpec = tween(durationMillis = 0, easing = FastOutSlowInEasing)
|
||||
@ -102,7 +100,7 @@ fun PrintReceiptScreen(
|
||||
isPrinting = false
|
||||
val upcomingCopy = if (reprint) ReceiptCopy.CUSTOMER
|
||||
else if (actualCopy == ReceiptCopy.MERCHANT) ReceiptCopy.CUSTOMER
|
||||
else ReceiptCopy.MERCHANT
|
||||
else ReceiptCopy.CUSTOMER
|
||||
|
||||
currentCopy = upcomingCopy
|
||||
nextCopy = upcomingCopy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user