diff --git a/src/org/yaaic/adapter/DeckAdapter.java b/src/org/yaaic/adapter/DeckAdapter.java index 1da3577..204a857 100644 --- a/src/org/yaaic/adapter/DeckAdapter.java +++ b/src/org/yaaic/adapter/DeckAdapter.java @@ -41,7 +41,7 @@ public class DeckAdapter extends BaseAdapter { private HashMap map = new HashMap(); private LinkedList channels = new LinkedList(); - private View currentView; + private MessageListView currentView; private String currentChannel; private int width; @@ -128,7 +128,7 @@ public class DeckAdapter extends BaseAdapter * * @param switched */ - public void setSwitched(String channel, View current) + public void setSwitched(String channel, MessageListView current) { currentChannel = channel; currentView = current; @@ -139,7 +139,7 @@ public class DeckAdapter extends BaseAdapter * * @return */ - public View getSwitchedView() + public MessageListView getSwitchedView() { return currentView; } diff --git a/src/org/yaaic/view/ServerActivity.java b/src/org/yaaic/view/ServerActivity.java index e239477..9e1fffa 100644 --- a/src/org/yaaic/view/ServerActivity.java +++ b/src/org/yaaic/view/ServerActivity.java @@ -226,6 +226,11 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann MessageListAdapter adapter = view.getAdapter(); adapter.addMessage(message); } + + if (deckAdapter.isSwitched()) { + MessageListView switchedView = deckAdapter.getSwitchedView(); + switchedView.getAdapter().addMessage(message); + } } /**