mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-23 09:22:19 -05:00
ConversationActivity: Added "close" to menu
This commit is contained in:
parent
902b1a5b09
commit
456bf0b515
@ -24,8 +24,12 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
android:id="@+id/join"
|
android:id="@+id/join"
|
||||||
android:title="@string/join_channel"
|
android:title="@string/join_channel"
|
||||||
android:icon="@android:drawable/ic_menu_add" />
|
android:icon="@android:drawable/ic_menu_add" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/close"
|
||||||
|
android:title="@string/close"
|
||||||
|
android:icon="@android:drawable/ic_menu_close_clear_cancel" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/disconnect"
|
android:id="@+id/disconnect"
|
||||||
android:title="@string/disconnect"
|
android:title="@string/disconnect"
|
||||||
android:icon="@android:drawable/ic_menu_close_clear_cancel" />
|
android:icon="@android:drawable/ic_menu_revert" />
|
||||||
</menu>
|
</menu>
|
@ -25,6 +25,7 @@
|
|||||||
<string name="channel">Channel</string>
|
<string name="channel">Channel</string>
|
||||||
<string name="join">Join</string>
|
<string name="join">Join</string>
|
||||||
<string name="join_channel">Join Channel</string>
|
<string name="join_channel">Join Channel</string>
|
||||||
|
<string name="close">Close</string>
|
||||||
<string name="connect">Connect</string>
|
<string name="connect">Connect</string>
|
||||||
<string name="disconnect">Disconnect</string>
|
<string name="disconnect">Disconnect</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
|
@ -41,6 +41,7 @@ import android.widget.Gallery;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
import android.widget.ViewSwitcher;
|
import android.widget.ViewSwitcher;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.AdapterView.OnItemSelectedListener;
|
import android.widget.AdapterView.OnItemSelectedListener;
|
||||||
@ -233,7 +234,14 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
|
case R.id.close:
|
||||||
|
Conversation conversation = deckAdapter.getItem(deck.getSelectedItemPosition());
|
||||||
|
if (conversation.getType() != Conversation.TYPE_SERVER) {
|
||||||
|
onRemoveConversation(conversation.getName());
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case R.id.join:
|
case R.id.join:
|
||||||
startActivityForResult(new Intent(this, JoinActivity.class), 0);
|
startActivityForResult(new Intent(this, JoinActivity.class), 0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user