TYuenCN / networkpx

Automatically exported from code.google.com/p/networkpx
0 stars 0 forks source link

a patch for grip to fix duplicate email issue #466

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This patch fixes the issue where GrIP displays each new email twice in the
view that shows when the alert is clicked.  It also fixes the count.

You will be modifying lines 270-272 in YouveGotMail.m:
for (Message* message in theMessages) {
                ...
                MailAccount* acct = message.account;
                [dirtyAccounts addObject:(acct.fullUserName ?:
[acct.emailAddresses objectAtIndex:0])];
                ...
}

place the following above MailAccount* acct...
if (!CFDictionaryContainsValue(messages, message))
   continue;

Original issue reported on code.google.com by r0ssa...@gmail.com on 8 Dec 2009 at 10:59

GoogleCodeExporter commented 8 years ago
I've attached a build that contains this patch along with my patch for #465, 
enjoy!

Original comment by r0ssa...@gmail.com on 8 Dec 2009 at 11:02

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by kennytm@gmail.com on 25 Dec 2009 at 8:59

GoogleCodeExporter commented 8 years ago
Fantastic patch!  Thanks!

Original comment by tjg...@gmail.com on 26 Jan 2010 at 4:06

GoogleCodeExporter commented 8 years ago
No problem.

Original comment by r0ssa...@gmail.com on 26 Jan 2010 at 4:48

GoogleCodeExporter commented 8 years ago
Patch applied in r618.

Original comment by kennytm@gmail.com on 26 Jan 2010 at 6:40

GoogleCodeExporter commented 8 years ago
Issue 359 has been merged into this issue.

Original comment by kennytm@gmail.com on 27 Jan 2010 at 5:24

GoogleCodeExporter commented 8 years ago
Problem still exists.

Original comment by kennytm@gmail.com on 27 Jan 2010 at 5:24

GoogleCodeExporter commented 8 years ago
I just re-checked my local source tree, the patch is off by one line.  Put the 
patch
directly after:
if (message.messageFlags & 1) 
    continue;

Original comment by r0ssa...@gmail.com on 27 Jan 2010 at 1:33

GoogleCodeExporter commented 8 years ago
Better yet, merge the if statement with
if (message.messageFlgs & 1)

Original comment by r0ssa...@gmail.com on 27 Jan 2010 at 1:46

GoogleCodeExporter commented 8 years ago
Applied in r619. (Wait for another day to see if it works :) )

Original comment by kennytm@gmail.com on 27 Jan 2010 at 2:01

GoogleCodeExporter commented 8 years ago
will test it...

by the way, is this a sign you´re back working on inotifyex too?

Original comment by anton...@gmail.com on 28 Jan 2010 at 1:24

GoogleCodeExporter commented 8 years ago
r619 seems to be broken, does not show any type of grip notification with 
either the
2 mails bug or the 0 mails bug. ive downgraded to r0ssar00'ss patched r build 
and
everything is working fine again with gmail. no duplicate email bug or 0 email 
bug :)

Original comment by colm...@gmail.com on 31 Jan 2010 at 5:59

GoogleCodeExporter commented 8 years ago
Which version of the patch are you using then?  Is the if statement before or 
after
the CFDictionaryAddValue call.

Original comment by r0ssa...@gmail.com on 31 Jan 2010 at 6:06

GoogleCodeExporter commented 8 years ago
r0ssar00, can you upload a new patched version fixing the code?

Looks like Kenny's version "s" is totally broken.

Original comment by jklurf...@gmail.com on 6 Mar 2010 at 9:02

GoogleCodeExporter commented 8 years ago
Here's an updated deb for grip along with the source file with comments 
indicating
the patch.  I used version "r" to build this, the changes (barring major changes
between r and s) should be easy to apply to trunk (or later releases).
The only difference between 0.1.11r stock and the patched 0.1.11r is the fix for
YouveGotMail.

Original comment by r0ssa...@gmail.com on 6 Mar 2010 at 9:15

Attachments:

GoogleCodeExporter commented 8 years ago
thanks.

No clue whats new in "s" because no notifications come in at all when its 
installed.
 Had to revert back to your "r" as others have seen too

Original comment by jklurf...@gmail.com on 9 Mar 2010 at 6:47

GoogleCodeExporter commented 8 years ago
No problem.
I just checked the revision of my local tree and it's HEAD (r619) so it may 
actually
be *newer* than "s".

Original comment by r0ssa...@gmail.com on 9 Mar 2010 at 6:54

GoogleCodeExporter commented 8 years ago
its throwing an error code 256

its says "trying to overwrite "/usr/lib/libsubstrate.dylib" which is also in 
package
mobilesubstrate"

Original comment by jklurf...@gmail.com on 9 Mar 2010 at 6:57

GoogleCodeExporter commented 8 years ago
Oops, hold on a sec, that's a packaging problem.  New version up in 2 mins...

Original comment by r0ssa...@gmail.com on 9 Mar 2010 at 6:59

GoogleCodeExporter commented 8 years ago
Try this version.

It displayed that error because I left libsubstrate.dylib in the grip package.  
The
dylib is supplied by MobileSubstrate and the grip package was trying to replace 
the
file from MobileSubstrate.  You can probably see how that would be a Bad Thing.

Original comment by r0ssa...@gmail.com on 9 Mar 2010 at 7:03

Attachments:

GoogleCodeExporter commented 8 years ago
works now thanks a ton

Original comment by jklurf...@gmail.com on 9 Mar 2010 at 7:08

GoogleCodeExporter commented 8 years ago
sorry for being a noob, how do i run this?

Original comment by oluf...@gmail.com on 11 Aug 2010 at 6:58

GoogleCodeExporter commented 8 years ago
Thanks for working on the fix and supplying a download.  What I have discovered 
is that on ios 4.1 3G, the notification for email seems to only work for pop 
accounts and not activesync'ed gmail accounts.  Additionally, I am not getting 
anymore 'Push alert' notification from Grip. Could the implementation and fix 
logic for emails have eclipse this?

thanks in advance 

Original comment by duan...@gmail.com on 7 Oct 2010 at 3:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
1) The fix has nothing to do with the type of email account.
2) The push alert system is in a completely different plugin.  The mail plugin 
could be totally borked and the push plugin wouldn't be affected.

Original comment by r0ssa...@gmail.com on 7 Oct 2010 at 3:41

GoogleCodeExporter commented 8 years ago
Thanks for responding r0ssar00
1) In testing it was consistent that my yahoo mail account would produce a 
notification through Grip and my activesync'ed gmail would not.  I removed each 
and tested individually with the same results
2) I understand the modules are separated but still encountered the issue with 
this version.  This was not the case with current Cydia version which creates 
multiples of activesync'ed gmail. 

Again, thanks for you efforts and comments.  I look forward to any new 
versions!!!

Original comment by duan...@gmail.com on 8 Oct 2010 at 1:37

GoogleCodeExporter commented 8 years ago
I honestly don't know why you're having problems.  I only added 2 lines and 
neither specifically excludes certain types of accounts.  Perhaps 
implementation details re: Mail.app and it's frameworks changed in iOS 4 
causing this problem?

Original comment by r0ssa...@gmail.com on 12 Oct 2010 at 3:24

GoogleCodeExporter commented 8 years ago
That must be the issue.  iOS 4.1 must have a different implementation.  I would 
make sense because iphone mail now unifies multiple inboxes and allows multiple 
activesync accounts.  I'll try to play around with the source and see what I 
come up with too. Thanks for your response 

Original comment by duan...@gmail.com on 13 Oct 2010 at 2:23

GoogleCodeExporter commented 8 years ago
no problem!  I just wish I were able to help some more but I don't know 
anything about iOS development.

Original comment by r0ssa...@gmail.com on 13 Oct 2010 at 2:27