[blam] ItemList: forget about changing items automatically



commit 7684052178eb0d8d7d62ecb893ce9bf433e49602
Author: Carlos Martín Nieto <cmn dwim me>
Date:   Sun Feb 24 23:29:14 2013 +0100

    ItemList: forget about changing items automatically
    
    It's not good UX to change the current item when selecting a channel
    from the list, so don't do it.

 src/Application.cs |    2 +-
 src/ItemList.cs    |   23 ++---------------------
 2 files changed, 3 insertions(+), 22 deletions(-)
---
diff --git a/src/Application.cs b/src/Application.cs
index 66bca75..d6c5880 100644
--- a/src/Application.cs
+++ b/src/Application.cs
@@ -737,7 +737,7 @@ namespace Imendio.Blam {
             UpdateTotalNumberOfUnread ();
 
             if (channelList.GetSelected () == channel) {
-                itemList.UpdateList(false);
+                itemList.UpdateList();
             }
         }
 
diff --git a/src/ItemList.cs b/src/ItemList.cs
index d95a32c..8c096ba 100644
--- a/src/ItemList.cs
+++ b/src/ItemList.cs
@@ -37,7 +37,7 @@ namespace Imendio.Blam {
 
            set {
                channel = value;
-               UpdateList(true);
+               UpdateList();
            }
        }
        
@@ -126,7 +126,7 @@ namespace Imendio.Blam {
                        return false;
                }
 
-               public void UpdateList(bool changed)
+               public void UpdateList()
                {
                        if (channel == null)
                                return;
@@ -141,25 +141,6 @@ namespace Imendio.Blam {
 
                                list.AppendValues(store.Get(id));
                        }
-
-                       if (changed) {
-                               // Now we have the current list of items, go to the first unread or latest
-                               if (Next(true))
-                                       return;
-
-                               TreeIter iter;
-                               if (!Model.GetIterFirst(out iter))
-                                       return;
-
-                               list.Foreach((TreeModel model, TreePath path, TreeIter i) => {
-                                       if (CompareFunc(Model, iter, i) < 0)
-                                               iter = i;
-
-                                       return false;
-                               });
-
-                               ScrollTo(iter);
-                       }
                }
 
        public void Update (Item item)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]