@Override protected void onPostExecute(String result) { try { if (this.dialog != null) { this.dialog.dismiss(); } if (this.exception != null) { MainActivity.error(this.exception.getMessage(), this.exception, this.activity); } } catch (Exception exception) { Log.wtf("HttpUIAction", exception); } }
@Override public void onPostExecute(String xml) { super.onPostExecute(xml); if (this.exception != null) { return; } try { ((ChatActivity) this.activity).resetAvatar(this.config); } catch (Exception error) { this.exception = error; MainActivity.error(this.exception.getMessage(), this.exception, this.activity); return; } }
public void chat(View view) { ListView list = (ListView) findViewById(R.id.instancesList); int index = list.getCheckedItemPosition(); if (index < 0) { MainActivity.showMessage("Select a channel", this); return; } this.instance = instances.get(index); ChannelConfig config = new ChannelConfig(); config.id = this.instance.id; config.name = this.instance.name; HttpAction action = new HttpFetchAction(this, config, true); action.execute(); }
@Override public void onPostExecute(String xml) { super.onPostExecute(xml); if (this.exception != null) { return; } try { MainActivity.botMode = botMode; ((ChannelBotActivity) this.activity).resetView(); } catch (Exception error) { this.exception = error; MainActivity.error(this.exception.getMessage(), this.exception, this.activity); return; } }