Advertisement
EnGold

viewmodel

Sep 5th, 2023 (edited)
2,488
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 1.13 KB | None | 0 0
  1. data class BackDropData(
  2.     val number: Int,
  3.     val axisX: Int = 0,
  4.     var axisY: Int = 0,
  5. )
  6.  
  7.  
  8. class BackgroundAnimationViewModel: ViewModel() {
  9.     private var item: Int = 0
  10.     private var _list = MutableStateFlow(emptyList<BackDropData>().toMutableList())
  11.     var list: StateFlow<List<BackDropData>> = _list.asStateFlow()
  12.  
  13.  
  14.     fun addNewItem() {
  15.         _list.update {cur ->
  16.             cur.toMutableList().also {
  17.                 it.add(BackDropData(item++, axisX =  (0..350).random()))
  18.             }
  19.         }
  20.     }
  21.     private fun deleteItem(item: BackDropData) {
  22.             _list.update {cur ->
  23.                 cur.toMutableList().also {
  24.                     it.remove(item)
  25.                 }
  26.             }
  27.     }
  28.     fun fallingAnimation(item: BackDropData, limit: Int){
  29.         viewModelScope.launch{
  30.             while (item.axisY < limit) {
  31.                 delay(1)
  32.                 _list.updateAndGet { cur ->
  33.                     cur.toMutableList().also {
  34.                         it[it.indexOf(item)].axisY++
  35.                     }
  36.                 }
  37.             }
  38.             deleteItem(item)
  39.         }
  40.     }
  41. }
Advertisement
Comments
  • FullzProvider
    257 days
    # text 1.14 KB | 0 1
    1. FRESH FULLZ/PROS USA|UK|CANADA
    2.  
    3. SSN+DOB+DL with high credit scores fresh fullz
    4. CC with CVV & DUMPS track 101 & 202 with Pin codes
    5. Business EIN fullz
    6. SSN DOB fullz in Bulk on cheap prices
    7. DL Scan front/back with selfie & SSN scan
    8. Fresh leads for all USA States
    9. Office365 Leads & Logins
    10. --------
    11. PRICING:
    12. --------
    13. SSN+DOB Fullz = 1$ each (bulk order preferable)
    14. SSN+DOB+DL Fullz/Pros = 2$ each (min 50)
    15. High Credit Score Pros with DL = 5$ each (min 20)
    16. CC with CVV with SSN = 5$ each (min 10)
    17. Dumps with pin Track 101&202 = 75$ each
    18. SMTP/RDP = 20$-25$
    19. C-panels = 50$
    20. Shells/Web-mailers = 15$
    21.  
    22. Other spamming, carding, hacking, scripting Tools & Tutorials are also available
    23. Updated Loan Methods, Cash out Methods, Transfer/Top-up Methods
    24. ------
    25. NOTE:
    26. ------
    27. Prices will be reduce in bulk order
    28. All stuff will be fresh & verified 80% to 90% working guarantee
    29. Invalid info will be replaced
    30. Don't ask for free samples
    31. No Refund, Only replacement
    32. 24/7 delivery available
    33.  
    34. Email= hacksp007 @ dnmx.org
    35. Telegram = @leadsupplier , @killhacks
    36. ICQ = 752822040 / @killhacks
    37. Skype/WickrMe = @peeterhacks
    38. WhatsApp = *will be given on demand*
Add Comment
Please, Sign In to add comment
Advertisement