From 9d7e360e7c1f7f9434dfa49c2054821804a5507b Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Wed, 10 Mar 2010 22:10:40 +0100 Subject: [PATCH] Scroll to new conversations on create --- src/org/yaaic/view/ServerActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/yaaic/view/ServerActivity.java b/src/org/yaaic/view/ServerActivity.java index b7fae8c..f27c1af 100644 --- a/src/org/yaaic/view/ServerActivity.java +++ b/src/org/yaaic/view/ServerActivity.java @@ -249,6 +249,11 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann public void onNewConversation(String target) { deckAdapter.addItem(server.getConversation(target)); + + if (!deckAdapter.isSwitched()) { + // Scroll to new conversation + deck.setSelection(deckAdapter.getCount() - 1); + } } /**