SHARE
TWEET

Untitled

a guest Feb 24th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import k2m.koli.model.ArrivalOrderItem
  2.  
  3. open class BaseFieldsHelper {
  4.  
  5.     fun compareArrivalTime(timeAfterArrival: Long, item: ArrivalOrderItem?, vararg views: View) {
  6.         if (item != null) {
  7.             if (item.allowEditMinutes != null && (item.allowEditMinutes == 0 || timeAfterArrival > item.allowEditMinutes!! * 60000)) {
  8.                 setViewsEnabling(false, *views)
  9.             } else {
  10.                 setViewsEnabling(true, *views)
  11.             }
  12.         }
  13.     }
  14.  
  15.     private fun setViewsEnabling(isEnabled: Boolean, vararg views: View) {
  16.         for (view in views) {
  17.             view.isEnabled = isEnabled
  18.         }
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top