[polari] app: Handle case-mismatches when saving/removing channels



commit 1e9a0705a6cf4de249b51d1b60a89f0793f26162
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 1 22:30:48 2015 +0200

    app: Handle case-mismatches when saving/removing channels
    
    While we now match non-lowercase channel names correctly to their
    corresponding channel, we still (wrongly) assume that requested
    names match channel identifiers when adding or removing saved
    channels. Fix this by making the channel matching case-insensitive.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755722

 src/application.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 3362e5d..be772ac 100644
--- a/src/application.js
+++ b/src/application.js
@@ -201,9 +201,10 @@ const Application = new Lang.Class({
 
     _savedChannelIndex: function(savedChannels, account, channel) {
         let accountPath = account.get_object_path();
+        let matchChannel = channel.toLowerCase();
         for (let i = 0; i < savedChannels.length; i++)
             if (savedChannels[i].account.deep_unpack() == accountPath &&
-                savedChannels[i].channel.deep_unpack() == channel)
+                savedChannels[i].channel.deep_unpack().toLowerCase() == matchChannel)
                 return i;
         return -1;
     },


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