package Ġmob dao . com . open quiz . utils . extensions Ċ Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . navigation . Nav Directions Ċ import Ġandroidx . navigation . fragment . find Nav Controller Ċ Ċ fun Ġ< T > ĠFragment . setup Observer ( ĊĠĠĠ Ġpair : ĠPair < LiveData < T >, Ġ( T ) Ġ-> ĠUnit > Ċ ) Ġ= Ġpair . first . observe ( view Lifecycle Owner , Ġ{ Ġit ?. let ( pair . second ) Ġ}) Ċ Ċ fun ĠFragment . setup Single Event Observer ( ĊĠĠĠ Ġpair : ĠPair < Mutable LiveData < Unit >, Ġ() Ġ-> ĠUnit ?> Ċ ) Ġ= Ġpair . first . observe ( view Lifecycle Owner , Ġ{ Ġpair . second () Ġ}) Ċ Ċ fun ĠFragment . navigate ( direction : ĠNav Directions ) Ġ{ ĊĠĠĠ Ġfind Nav Controller (). navigate ( direction ) Ċ } Ċ