fix crash in Dana fragment
This commit is contained in:
parent
8f3c4e25c5
commit
4f562d8f86
1 changed files with 2 additions and 10 deletions
|
@ -55,16 +55,6 @@ class DanaRFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
loopHandler.postDelayed(refreshLoop, T.mins(1).msecs())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
loopHandler.removeCallbacks(refreshLoop)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?): View? {
|
savedInstanceState: Bundle?): View? {
|
||||||
return inflater.inflate(R.layout.danar_fragment, container, false)
|
return inflater.inflate(R.layout.danar_fragment, container, false)
|
||||||
|
@ -109,11 +99,13 @@ class DanaRFragment : Fragment() {
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
MainApp.bus().unregister(this)
|
MainApp.bus().unregister(this)
|
||||||
|
loopHandler.removeCallbacks(refreshLoop)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
MainApp.bus().register(this)
|
MainApp.bus().register(this)
|
||||||
|
loopHandler.postDelayed(refreshLoop, T.mins(1).msecs())
|
||||||
activity?.runOnUiThread { updateGUI() }
|
activity?.runOnUiThread { updateGUI() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue