Changeset 61e3f4


Ignore:
Timestamp:
Sep 10, 2018, 5:40:16 PM (3 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
6a4b56
Parents:
e4b836
Message:

compose-window is not recycled anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/v_identity.js

    re4b836 r61e3f4  
    8484        ComposeProcessDone: function (aResult) {
    8585          Log.debug("StateListener reports ComposeProcessDone");
    86           vI.vIaccount_removeUsedVIAccount();
    8786          vI.storage.clean();
    8887        },
    8988        SaveInFolderDone: function (folderURI) {
    9089          Log.debug("SaveInFolderDone");
    91           vI.vIaccount_removeUsedVIAccount();
    9290          vI.storage.clean();
    9391        }
     
    167165      },
    168166
    169       remove: function () {
    170         window.removeEventListener('compose-window-reopen', main.reopen, true);
    171         window.removeEventListener('compose-window-close', main.close, true);
    172         Log.debug("end. remove Account if there.")
    173         vI.storage.clean();
    174       },
    175 
    176167      _getRecipients: function () {
    177168        var recipients = [];
     
    216207        window.removeEventListener('load', main.init, false);
    217208        window.removeEventListener('compose-window-init', main.init, true);
    218         if (main.elements.Area_MsgIdentityHbox) return; // init done before, (?reopen)
     209
    219210        Log.debug("init.")
    220211        main.unicodeConverter.charset = "UTF-8";
     
    231222        document.getElementById("virtualIdentityExtension_tooltipPopupset")
    232223          .addTooltip(document.getElementById("msgIdentity"), false);
    233         window.addEventListener('compose-window-reopen', main.reopen, true);
    234         window.addEventListener('compose-window-close', main.close, true);
    235224
    236225        main.AccountManagerObserver.register();
     
    248237      },
    249238
    250       close: function () {
    251         vI.storage.clean();
    252       },
    253 
    254239      adapt_loadIdentity: function () {
    255240        if (main.original_functions.LoadIdentity) return true; // only initialize this once
     
    266251        GenericSendMessage = main.replacement_functions.GenericSendMessage;
    267252        return true;
    268       },
    269 
    270       reopen: function () {
    271         vI.clearDebugOutput();
    272         Log.debug("composeDialog reopened. (msgType " + gMsgCompose.type + ")")
    273         Log.debug("document.title=" + document.title + " gMsgCompose=" + gMsgCompose + " msgIdentityMenu=" + document.getElementById("msgIdentity"))
    274 
    275         // clean all elements
    276         document.getElementById("msgIdentity").clean();
    277         vI.storage.clean(); // just to be sure!
    278         Log.debug("everything cleaned.")
    279 
    280         // register StateListener
    281         gMsgCompose.RegisterStateListener(main.ComposeStateListener);
    282 
    283         // now (re)init the elements
    284         main.initSystemStage1();
    285 
    286         vI.vIprefs.dropLocalChanges();
    287 
    288         // NotifyComposeBodyReady is only triggered in reply-cases
    289         // so activate stage2 in reply-cases trough StateListener
    290         // in other cases directly
    291         var msgComposeType = Components.interfaces.nsIMsgCompType;
    292         switch (gMsgCompose.type) {
    293         case msgComposeType.New:
    294         case msgComposeType.NewsPost:
    295         case msgComposeType.MailToUrl:
    296         case msgComposeType.Draft:
    297         case msgComposeType.Template:
    298         case msgComposeType.ForwardAsAttachment:
    299         case msgComposeType.ForwardInline:
    300           main.initSystemStage2();
    301           //             case msgComposeType.Reply:
    302           //             case msgComposeType.ReplyAll:
    303           //             case msgComposeType.ReplyToGroup:
    304           //             case msgComposeType.ReplyToSender:
    305           //             case msgComposeType.ReplyToSenderAndGroup:
    306           //             case msgComposeType.ReplyWithTemplate:
    307           //             case msgComposeType.ReplyToList:
    308           //                 main.initSystemStage2() triggered trough NotifyComposeBodyReady;
    309         }
    310         Log.debug("reopen done.")
    311253      },
    312254
Note: See TracChangeset for help on using the changeset viewer.