Browse Source

Fix background services notifications.

pull/11/head
Eric Kok 11 years ago
parent
commit
cdca689893
  1. BIN
      core/libs/transdroid-connect.jar
  2. 8
      core/res/values/strings.xml
  3. 2
      core/src/org/transdroid/core/service/ServerCheckerService.java
  4. 2
      lib/src/org/transdroid/daemon/util/Collections2.java

BIN
core/libs/transdroid-connect.jar

Binary file not shown.

8
core/res/values/strings.xml

@ -102,15 +102,15 @@ @@ -102,15 +102,15 @@
<string name="status_update">Update</string>
<plurals name="status_service_added">
<item quantity="one">New torrent added</item>
<item quantity="many">%1$s new torrents added</item>
<item quantity="other">%1$s new torrents added</item>
</plurals>
<plurals name="status_service_finished">
<item quantity="one">Torrent is finished</item>
<item quantity="many">%1$s torrents are finished</item>
<item quantity="other">%1$s torrents are finished</item>
</plurals>
<plurals name="status_service_addedfinished">
<item quantity="one">%1$s added, %2$s finished torrent</item>
<item quantity="many">%1$s added, %2$s finished torrents</item>
<item quantity="other">%1$s added, %2$s finished torrents</item>
</plurals>
<string name="status_service_andothers">%1$s and others</string>
@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
</plurals>
<plurals name="rss_service_new">
<item quantity="one">New RSS feed torrent available</item>
<item quantity="many">%1$s new RSS feed torrents</item>
<item quantity="other">%1$s new RSS feed torrents</item>
</plurals>
<string name="rss_service_newfor">New torrents for %1$s</string>

2
core/src/org/transdroid/core/service/ServerCheckerService.java

@ -103,7 +103,7 @@ public class ServerCheckerService extends IntentService { @@ -103,7 +103,7 @@ public class ServerCheckerService extends IntentService {
newTorrents.add(torrent);
continue;
}
if (server.shouldAlarmOnFinishedDownload() && torrent.getPartDone() == 1F && !wasDone)
if (server.shouldAlarmOnFinishedDownload() && torrent.getPartDone() == 1F && wasDone != null && !wasDone)
// This torrent is now done, but wasn't before
doneTorrents.add(torrent);
}

2
lib/src/org/transdroid/daemon/util/Collections2.java

@ -15,7 +15,7 @@ public class Collections2 { @@ -15,7 +15,7 @@ public class Collections2 {
String result = "";
Iterator<T> it = iterable.iterator();
while (it.hasNext()) {
result = (first ? "" : separator) + it.next().toString();
result += (first ? "" : separator) + it.next().toString();
first = false;
}
return result;

Loading…
Cancel
Save