Changeset 48f9f5


Ignore:
Timestamp:
Jul 17, 2009, 8:03:17 PM (12 years ago)
Author:
rene <rene@…>
Branches:
lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
cb14c8
Parents:
dd3c77
Message:

prefer existing Identity (fix for #136)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_smartIdentity.js

    rdd3c77 r48f9f5  
    362362   
    363363    __smartIdentitySelection : function(allIdentities, autocreate) {
     364        /* compare with existing Identities and prefer it                       */
     365        for (var index = 0; index < allIdentities.number; index++) {
     366            if (allIdentities.identityDataCollection[index].isExistingIdentity(true)) {
     367                vI_notificationBar.dump("## vI_smartIdentity: found existing Identity, prefer this one.\n");
     368                var firstIdentity = allIdentities.identityDataCollection[index];
     369                for (var i = index; index > 0; index--) {
     370                    allIdentities.identityDataCollection[index] = allIdentities.identityDataCollection[index-1];
     371                }
     372                allIdentities.identityDataCollection[0] = firstIdentity;
     373                break;
     374            }
     375        }
     376
    364377        document.getElementById("msgIdentity_clone").addIdentitiesToCloneMenu(allIdentities);
    365378       
Note: See TracChangeset for help on using the changeset viewer.