@@ -52,9 +52,9 @@ public class MainActivity extends AppCompatActivity {
5252 "Announce Hello" , "/cmd.announce Hello from Java Android" ,
5353 "Play YouTube" , "/tv.watch https://youtu.be/u5CVsCnxyXg" ,
5454 "Background Image" , "/css.background-image url(http://bit.ly/2lZxbHv)" ,
55- "Background Top" , "/css.background$#top #0091ea " ,
56- "Background" , "/css.background #fffde7 " ,
57- "Background Bottom" , "/css.background$#bottom #cccccc " ,
55+ "Background Top" , "/css.background$#top #86B951 " ,
56+ "Background Color " , "/css.background #eceff1 " ,
57+ "Background Bottom" , "/css.background$#bottom #91C654 " ,
5858 "Logout" , "/logout"
5959 );
6060
@@ -93,8 +93,9 @@ protected void onCreate(Bundle savedInstanceState) {
9393
9494 getClient ()
9595 .setOnConnect (connectMsg -> {
96- Extensions .updateChatHistory (getClient (), cmdReceiver );
97- Extensions .updateUserProfile (connectMsg , mainActivity );
96+ Extensions .updateChatHistory (getClient (), cmdReceiver , () -> {
97+ Extensions .updateUserProfile (connectMsg , mainActivity );
98+ });
9899 })
99100 .setOnCommand (command -> {
100101 if (command instanceof ServerEventJoin ){
@@ -156,14 +157,15 @@ public boolean onChannelClick(MenuItem menuItem)
156157 List <String > nChannels = Func .toList (getClient ().getChannels ());
157158 nChannels .add (nChannel );
158159 UiHelpers .resetChannelDrawer (this , navigationView , Func .toArray (nChannels , String .class ));
159- Extensions .changeChannel (getClient (), nChannel , cmdReceiver );
160- cmdReceiver .syncAdapter ();
160+ Extensions .changeChannel (getClient (), nChannel , cmdReceiver , () -> {
161+ cmdReceiver .syncAdapter ();
162+ });
161163 } catch (Exception ex ){
162164 errors .add (ex );
163165 }
164166 });
165167 } else {
166- Extensions .changeChannel (getClient (), itemText , cmdReceiver );
168+ Extensions .changeChannel (getClient (), itemText , cmdReceiver , () -> {} );
167169 }
168170 drawerLayout .closeDrawer (navigationView );
169171 return true ;
0 commit comments