SHARE
TWEET

Untitled

a guest Jun 26th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private fun getSalesData(session:Boolean,delayMs:Long,salesRequest: JsonObjectRequest){
  2.         lateinit var runnable: Runnable
  3.         if (session) {
  4.             HttpRequestSingleton.getInstance(this@NavBarActivity).addToRequestQueue(salesRequest)
  5.         }
  6.         Handler().apply {
  7.             runnable = object : Runnable {
  8.                 override fun run() {
  9.                     HttpRequestSingleton.getInstance(this@NavBarActivity).addToRequestQueue(salesRequest)
  10.                     Log.d(TAG, "se esta repitiendo cada 15 segs mamahuevo")
  11.                     postDelayed(this, delayMs)
  12.                 }
  13.             }
  14.             postDelayed(runnable, delayMs)
  15.             if (!session){
  16.                 Log.d(TAG,"entre aca como todo un crack")
  17.                 Handler().removeCallbacksAndMessages(runnable)
  18.             }
  19.         }
  20.         if(!session){
  21.             Log.d(TAG,"aanopqwwwwww")
  22.             Handler().removeCallbacksAndMessages(runnable)
  23.         }
  24.     }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top