Closed GoogleCodeExporter closed 8 years ago
You are right. Thanks for the report :)
Original comment by fschm...@gmail.com
on 19 Jul 2011 at 8:00
Original comment by fschm...@gmail.com
on 21 Jul 2011 at 4:09
I get this behavior for just the "sms" command as well.
Original comment by infophre...@gmail.com
on 23 Jul 2011 at 9:16
I have fixed this issue. Attached is the patch.
Diff
=====================================================================
diff -r 79fe97561d5c src/com/googlecode/gtalksms/cmd/smsCmd/SmsMmsManager.java
--- a/src/com/googlecode/gtalksms/cmd/smsCmd/SmsMmsManager.java Sun Jul 17
21:32:00 2011 +0200
+++ b/src/com/googlecode/gtalksms/cmd/smsCmd/SmsMmsManager.java Sun Jul 24
02:49:15 2011 -0700
@@ -83,12 +83,13 @@
if (c != null) {
for (boolean hasData = c.moveToFirst(); hasData && (getMax || nbSms < maxSms); hasData = c.moveToNext(), ++nbSms) {
String address = Tools.getString(c, "address");
+ String MessageSender = sender;
Sms sms = new Sms(address, Tools.getString(c, "body"), Tools.getDateMilliSeconds(c, "date"));
String receiver = isSentSms ? ContactsManager.getContactName(_context, address) : _context.getString(R.string.chat_me);
if (sender == null) {
- sender = isSentSms ? _context.getString(R.string.chat_me)
: ContactsManager.getContactName(_context, Tools.getLong(c, "person"));
+ MessageSender = isSentSms ?
_context.getString(R.string.chat_me) : ContactsManager.getContactName(_context,
Tools.getLong(c, "person"));
}
- sms.setSender(sender + " --> " + receiver);
+ sms.setSender(MessageSender + " --> " + receiver);
res.add(sms);
}
c.close();
=====================================================================
I tested it and this fixes the issue when the sms:unread or the sms command is
given.
I am new to this so please me know if I have done anything wrong when fixing an
issue!
Cheers,
Steven
Original comment by sdloner...@gmail.com
on 24 Jul 2011 at 10:12
Attachments:
Thanks for your patch sdlonergan. I did some work on this a few days before and
had the same idea. So don't be disappointed if I didn't include your version.
Original comment by fschm...@gmail.com
on 24 Jul 2011 at 6:41
No worries and I understand! I love the project and just wanted to help if I
could :)
Cheers,
Steven
Original comment by sdloner...@gmail.com
on 25 Jul 2011 at 12:59
Fixed in v3.1
Original comment by Florent....@gmail.com
on 13 Aug 2011 at 11:46
Original comment by fschm...@gmail.com
on 25 Aug 2011 at 7:50
Original issue reported on code.google.com by
Eckankar
on 18 Jul 2011 at 11:52