Changeset f382e7 for chrome


Ignore:
Timestamp:
Sep 2, 2008, 4:13:14 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
16f697
Parents:
98ccf0
Message:

rearranged and cleaned functions

File:
1 edited

Legend:

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

    r98ccf0 rf382e7  
    3838        var msgComposeType = Components.interfaces.nsIMsgCompType;
    3939        vI_notificationBar.dump("## vI_smartIdentity: msgComposeType = " + type + "\n");
    40        
    41         // if there is no ID of the original Message (Why? maybe new mail) dumpa notice
    42         var uri = gMsgCompose.originalMsgURI;
    43         if (!uri) vI_notificationBar.dump("## vI_smartIdentity: can't get URI of former Message\n");
    44         try { var hdr = vI_smartIdentity.messenger.messageServiceFromURI(uri).messageURIToMsgHdr(uri); }
    45         catch(vErr) {
    46             vI_notificationBar.dump("## vI_smartIdentity: can't get Message Header of former Message.\n");
    47             hdr = null;
    48         };
    49        
     40           
    5041        switch (type) {
    5142            case msgComposeType.ForwardAsAttachment:
     
    5748            case msgComposeType.ReplyToSenderAndGroup: // reply to a newsgroup, would possibly be stopped later
    5849            case msgComposeType.ReplyWithTemplate:
    59                 vI_smartIdentity.Reply(hdr); break;
     50                vI_smartIdentity.Reply(); break;
    6051            case msgComposeType.Draft:
    6152            case msgComposeType.Template:
    62                 vI_smartIdentity.Draft(hdr); break;
     53                vI_smartIdentity.Draft(); break;
    6354            case msgComposeType.New:
    6455            case msgComposeType.NewsPost:
     
    111102    },
    112103
    113     Draft : function(hdr) {
     104    Draft : function() {
    114105        vI_notificationBar.dump("## vI_smartIdentity: Draft()\n");
    115106       
     
    267258    },
    268259   
    269     Reply : function(hdr) {
     260    Reply : function() {
     261        var hdr = vI_smartIdentity.messenger.
     262            messageServiceFromURI(gMsgCompose.originalMsgURI).messageURIToMsgHdr(gMsgCompose.originalMsgURI);
     263
    270264        vI_notificationBar.dump("## vI_smartIdentity: Reply()\n");
    271         if (hdr.folder.flags & 0x0200) {    // MSG_FOLDER_FLAG_SENTMAIL
     265        if (hdr && (hdr.folder.flags & 0x0200)) {   // MSG_FOLDER_FLAG_SENTMAIL
    272266            vI_notificationBar.dump("## vI_smartIdentity: reply from Sent folder, using SmartDraft. \n");
    273267            vI_smartIdentity.ReplyOnSent(hdr);
Note: See TracChangeset for help on using the changeset viewer.