Changeset 552778


Ignore:
Timestamp:
Aug 17, 2018, 4:55:07 PM (2 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
4556a9
Parents:
711654
Message:

only add identity if it is not null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/v_identity.xml

    r711654 r552778  
    408408        var MenuItems = this._msgIdentityPopupElem.childNodes
    409409        for (var index = 0; index < MenuItems.length; index++) {
    410             if (typeof getCurrentIdentityKey == 'function') {
    411               // TB version after changeset 17696 35d9101cb3b1 (menuitem.value == email address)
    412                 var identity = this._AccountManager.getIdentity(MenuItems[index].getAttribute("identitykey"));
    413             } else {
    414               // TB version before changeset 17696 35d9101cb3b1 (menuitem.value == id)
    415                 var identity = this._AccountManager.getIdentity(MenuItems[index].getAttribute("value"));
    416             }
     410                        // TB version after changeset 17696 35d9101cb3b1 (menuitem.value == email address)
     411                        var identity = this._AccountManager.getIdentity(MenuItems[index].getAttribute("identitykey"));
     412                        if (!identity) continue;
    417413
    418414            var description;
    419             if (typeof(this._AccountManager.getServersForIdentity) == 'function') { // new style
    420                 var server = this._AccountManager.getServersForIdentity(identity).queryElementAt(0, Components.interfaces.nsIMsgIncomingServer);
    421             } else {
    422                 var server = this._AccountManager.GetServersForIdentity(identity).QueryElementAt(0, Components.interfaces.nsIMsgIncomingServer);
    423             }
    424             // if (server.type == "nntp")
     415                       
     416                        virtualIdentityExtension.MyLog.debug("getServersForIdentity" + identity);
     417                       
     418                        var server = this._AccountManager.getServersForIdentity(identity).queryElementAt(0, Components.interfaces.nsIMsgIncomingServer);
     419
     420                        // if (server.type == "nntp")
    425421                description = server.prettyName
    426422            // else description = identity.description?"- "+identity.description:identity.accountname
Note: See TracChangeset for help on using the changeset viewer.