Menu

#2 G4j2 enhancements

open
nobody
g4j (2)
5
2006-02-12
2006-02-12
g zombi
No

I think you should add the following methods to g4j2:

---
/java/g4j/g4j2/src/java/net/sf/gm/beans/GMMessage.java
2006-01-17 16:01:05.000000000 +0100
+++ gm/beans/GMMessage.java 2006-01-28
22:01:54.000000000 +0100
@@ -41,6 +41,8 @@
private String body;

private Collection<GMAttachment> attachments = new
ArrayList<GMAttachment>();
+
+ private GMThread thread;

/**
* @return Returns the body.
@@ -244,6 +246,14 @@
return attachments.add(o);
}

+ public GMThread getThread() {
+ return thread;
+ }
+
+ public void setThread(GMThread thread) {
+ this.thread = thread;
+ }
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/

---
/java/g4j/g4j2/src/java/net/sf/gm/beans/GMThread.java
2006-01-17 16:01:05.000000000 +0100
+++ gm/beans/GMThread.java 2006-01-28
22:02:32.000000000 +0100
@@ -117,6 +117,7 @@
*/
public boolean addMessage(GMMessage m)
{
+ m.setThread(this);
return messages.add(m);
}

In this way, you dont have to ask GMail everytime that
which thread the message belongs.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.