Fix download button text update
This commit is contained in:
1 parent
59085f1371
commit
8263ead395
1 file changed
+5
-6
@@ -129,7 +129,6 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
|
||||
private static final String KEY_GALLERY_DETAIL = "gallery_detail";
|
||||
private static final String KEY_REQUEST_ID = "request_id";
|
||||
private static final String KEY_DOWNLOAD_STATE = "download_state";
|
||||
|
||||
@Nullable
|
||||
@ViewLifeCircle
|
||||
@@ -349,10 +348,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
} else {
|
||||
onRestore(savedInstanceState);
|
||||
}
|
||||
}
|
||||
|
||||
private void onInit() {
|
||||
handleArgs(getArguments());
|
||||
long gid = getGid();
|
||||
if (gid != -1) {
|
||||
mDownloadState = EhApplication.getDownloadManager(getContext()).getDownloadState(gid);
|
||||
@@ -361,6 +357,10 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
|
||||
private void onInit() {
|
||||
handleArgs(getArguments());
|
||||
}
|
||||
|
||||
private void onRestore(Bundle savedInstanceState) {
|
||||
mAction = savedInstanceState.getString(KEY_ACTION);
|
||||
mGalleryInfo = savedInstanceState.getParcelable(KEY_GALLERY_INFO);
|
||||
@@ -368,7 +368,6 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
mToken = savedInstanceState.getString(KEY_TOKEN);
|
||||
mGalleryDetail = savedInstanceState.getParcelable(KEY_GALLERY_DETAIL);
|
||||
mRequestId = savedInstanceState.getInt(KEY_REQUEST_ID);
|
||||
mDownloadState = savedInstanceState.getInt(KEY_DOWNLOAD_STATE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -389,7 +388,6 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
outState.putParcelable(KEY_GALLERY_DETAIL, mGalleryDetail);
|
||||
}
|
||||
outState.putInt(KEY_REQUEST_ID, mRequestId);
|
||||
outState.putInt(KEY_DOWNLOAD_STATE, mDownloadState);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1254,6 +1252,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
private void onGetGalleryDetailSuccess(GalleryDetail result) {
|
||||
mGalleryDetail = result;
|
||||
if (isViewCreated()) {
|
||||
updateDownloadState();
|
||||
adjustViewVisibility(STATE_NORMAL, true);
|
||||
bindViewSecond();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user