1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 02:42:16 -05:00

Added empty UserActivity

This commit is contained in:
Sebastian Kaspari 2010-04-06 20:32:10 +02:00
parent c7d891e917
commit 94920feff2
4 changed files with 49 additions and 4 deletions

View File

@ -63,6 +63,11 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
android:label="@string/join_label"
android:theme="@android:style/Theme.Dialog">
</activity>
<activity
android:name=".activity.UsersActivity"
android:label="@string/users"
android:theme="@android:style/Theme.Dialog">
</activity>
<service android:name=".irc.IRCService"></service>
</application>

View File

@ -32,4 +32,6 @@
<string name="settings_label">Settings</string>
<string name="join_label">Join channel</string>
<string name="users_label">Users</string>
</resources>

View File

@ -237,9 +237,9 @@ public class ConversationActivity extends Activity implements ServiceConnection,
finish();
break;
case R.id.close:
Conversation conversation = deckAdapter.getItem(deck.getSelectedItemPosition());
if (conversation.getType() != Conversation.TYPE_SERVER) {
onRemoveConversation(conversation.getName());
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
onRemoveConversation(conversationToClose.getName());
} else {
Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show();
}
@ -248,7 +248,12 @@ public class ConversationActivity extends Activity implements ServiceConnection,
startActivityForResult(new Intent(this, JoinActivity.class), 0);
break;
case R.id.users:
// XXX: Todo, launch an user activity..
Conversation conversationForUserList = deckAdapter.getItem(deck.getSelectedItemPosition());
if (conversationForUserList.getType() == Conversation.TYPE_CHANNEL) {
startActivity(new Intent(this, UsersActivity.class));
} else {
Toast.makeText(this, "Only usable from within a channel", Toast.LENGTH_SHORT).show();
}
break;
}

View File

@ -0,0 +1,33 @@
/*
Yaaic - Yet Another Android IRC Client
Copyright 2009-2010 Sebastian Kaspari
This file is part of Yaaic.
Yaaic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Yaaic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
*/
package org.yaaic.activity;
import android.app.Activity;
/**
* User Activity - Shows a list of users in the current channel
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
public class UsersActivity extends Activity
{
}