diff options
author | Andrew Dolgov <[email protected]> | 2012-11-25 12:23:01 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-11-25 12:23:01 +0400 |
commit | 4f67f17fa0bc29554313909fdf376ecf0be6af33 (patch) | |
tree | 1bcff37ffd572f8a923e81ebb32ad911a967ae81 | |
parent | cad3eefbf35c088164da056bf6ebdd69a36d90bf (diff) |
upload sync progress onPause() when reading
-rw-r--r-- | AndroidManifest.xml | 4 | ||||
-rw-r--r-- | src/org/fox/ttcomics/ViewComicActivity.java | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 17d69e9..5a01ee2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,7 +1,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttcomics"
- android:versionCode="23"
- android:versionName="1.0.11" >
+ android:versionCode="24"
+ android:versionName="1.0.12" >
<uses-sdk
android:minSdkVersion="8"
diff --git a/src/org/fox/ttcomics/ViewComicActivity.java b/src/org/fox/ttcomics/ViewComicActivity.java index 3861615..e5790d9 100644 --- a/src/org/fox/ttcomics/ViewComicActivity.java +++ b/src/org/fox/ttcomics/ViewComicActivity.java @@ -8,6 +8,7 @@ import java.util.Date; import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -89,6 +90,16 @@ public class ViewComicActivity extends CommonActivity { super.onComicSelected(fileName, position);
}
+ public void onPause() {
+ super.onPause();
+
+ // upload progress
+ if (m_prefs.getBoolean("use_position_sync", false) && m_syncClient.hasOwner()) {
+ toast(R.string.sync_uploading);
+ m_syncClient.setPosition(sha1(new File(m_fileName).getName()), getLastPosition(m_fileName));
+ }
+ }
+
private void shareComic() {
ComicPager pager = (ComicPager) getSupportFragmentManager().findFragmentByTag(FRAG_COMICS_PAGER);
|