package Ġcom . github . wind se kir un . n ara es ftp . connection Ċ Ċ import Ġandroid . os . Bundle Ċ Ċ import Ġcom . github . wind se kir un . base app . base . Base Activity Ċ import Ġcom . github . wind se kir un . d agger auto inject . Inject Activity Ċ import Ġcom . github . wind se kir un . n ara es ftp . R Ċ import Ġcom . github . wind se kir un . n ara es ftp . databinding . Connection Activity Binding Ċ import Ġcom . github . wind se kir un . n ara es ftp . event .* Ċ import Ġcom . github . wind se kir un . n ara es ftp . progress . Confirm Dialog Ċ import Ġcom . github . wind se kir un . n ara es ftp . progress . Progress Indicator Dialog Ċ import Ġorg . green robot . event bus . Subscribe Ċ Ċ /** Ċ Ġ* ĠN ar ae SF TP Client Ċ Ġ* ĠClass : Ġ${ NAME } Ċ Ġ* ĠCreated Ġby ĠPy x is Ġon Ġ 2 0 1 8 - 1 2 - 2 7 . Ċ Ġ* Ċ Ġ* Ċ Ġ* ĠDescription : Ċ Ġ*/ Ċ Ċ @ Inject Activity Ċ class ĠConnection Activity Ġ: ĠBase Activity < Connection Activity Binding >() Ġ{ ĊĠĠĠ Ġlateinit Ġvar ĠviewModel : ĠConnection ViewModel ĊĊĠĠĠ Ġprivate Ġvar Ġprogress Indicator Dialog : ĠProgress Indicator Dialog ? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . connection _ activity ) ĊĠĠĠĠĠĠĠ ĠviewModel Ġ= Ġget ViewModel ( Connection ViewModel :: class . java ) ĊĠĠĠĠĠĠĠ Ġm Binding . viewModel Ġ= ĠviewModel ĊĊĠĠĠĠĠĠĠ Ġinit RecyclerView < Connection Item Adapter >( m Binding . re cyclerView , ĠConnection Item Adapter :: class . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun Ġon Open Connection Add Dialog ( event : ĠOpen Connection Add Dialog ) Ġ{ ĊĠĠĠĠĠĠĠ ĠConnection Add Dialog . show ( this , Ġevent . callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun Ġon Open Connection Edit Dialog ( event : ĠOpen Connection Edit Dialog ) Ġ{ ĊĠĠĠĠĠĠĠ ĠConnection Edit Dialog . show ( this , Ġevent . item , Ġevent . callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun ĠonClick Connection Item Event ( event : ĠClick Connection Item Event ) Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel . try Connection ( event . item ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun Ġon Progress Indicator Dialog ( event : ĠOpen Progress Indicator Dialog ) Ġ{ ĊĠĠĠĠĠĠĠ Ġprogress Indicator Dialog Ġ= ĠProgress Indicator Dialog . show ( this , Ġevent . message ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun ĠonClose Progress Indicator Dialog ( event : ĠClose Progress Indicator Dialog ) Ġ{ ĊĠĠĠĠĠĠĠ Ġprogress Indicator Dialog ?. dismiss () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun Ġon Open Confirm Dialog ( event : ĠOpen Confirm Dialog ) Ġ{ ĊĠĠĠĠĠĠĠ ĠConfirm Dialog . show ( this , Ġevent . message , Ġevent . callback , Ġevent . close Callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Subscribe ĊĠĠĠ Ġfun ĠonClick Long Connection Item Event ( event : ĠClick Long Connection Item Event ) Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel . click Connection Long ( event . item ) ĊĠĠĠ Ġ} Ċ }