1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-02-07 12:03:28 +01:00
fixed #314
This commit is contained in:
Mariotaku Lee 2016-02-05 11:44:36 +08:00
parent 20b09ae809
commit fa256c69aa
4 changed files with 6 additions and 40 deletions

View File

@ -115,8 +115,8 @@ dependencies {
compile 'com.google.dagger:dagger:2.0.2' compile 'com.google.dagger:dagger:2.0.2'
compile 'org.attoparser:attoparser:1.4.0.RELEASE' compile 'org.attoparser:attoparser:1.4.0.RELEASE'
compile 'com.j256.simplemagic:simplemagic:1.6' compile 'com.j256.simplemagic:simplemagic:1.6'
compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.6' compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.7'
compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.6' compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.7'
googleCompile 'com.google.android.gms:play-services-maps:8.4.0' googleCompile 'com.google.android.gms:play-services-maps:8.4.0'
// googleCompile 'com.google.maps.android:android-maps-utils:0.4' // googleCompile 'com.google.maps.android:android-maps-utils:0.4'
googleCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true } googleCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true }

View File

@ -99,7 +99,6 @@ import java.util.concurrent.TimeUnit;
import javax.inject.Inject; import javax.inject.Inject;
public final class MediaViewerActivity extends AbsMediaViewerActivity implements Constants, public final class MediaViewerActivity extends AbsMediaViewerActivity implements Constants,
AppCompatCallback, TaskStackBuilder.SupportParentable, ActionBarDrawerToggle.DelegateProvider, AppCompatCallback, TaskStackBuilder.SupportParentable, ActionBarDrawerToggle.DelegateProvider,
IExtendedActivity { IExtendedActivity {
@ -585,6 +584,7 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
/** /**
* @hide * @hide
*/ */
@Override
public void invalidateOptionsMenu() { public void invalidateOptionsMenu() {
getDelegate().invalidateOptionsMenu(); getDelegate().invalidateOptionsMenu();
} }
@ -808,23 +808,6 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
} }
} }
@Override
protected void displayMedia(CacheDownloadLoader.Result data) {
super.displayMedia(data);
getActivity().supportInvalidateOptionsMenu();
}
@Override
public void hideProgress() {
super.hideProgress();
getActivity().supportInvalidateOptionsMenu();
}
@Override
public void showProgress(boolean indeterminate, float progress) {
super.showProgress(indeterminate, progress);
getActivity().supportInvalidateOptionsMenu();
}
} }
public static class VideoPageFragment extends CacheDownloadMediaViewerFragment public static class VideoPageFragment extends CacheDownloadMediaViewerFragment
@ -864,24 +847,6 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
return getArguments().getBoolean(EXTRA_LOOP, false); return getArguments().getBoolean(EXTRA_LOOP, false);
} }
@Override
public void hideProgress() {
super.hideProgress();
getActivity().supportInvalidateOptionsMenu();
}
@Override
public void showProgress(boolean indeterminate, float progress) {
super.showProgress(indeterminate, progress);
getActivity().supportInvalidateOptionsMenu();
}
@Override
public void setMediaViewVisible(boolean visible) {
super.setMediaViewVisible(visible);
getActivity().supportInvalidateOptionsMenu();
}
@Override @Override
protected boolean isAbleToLoad() { protected boolean isAbleToLoad() {
return getDownloadUri() != null; return getDownloadUri() != null;

View File

@ -1392,7 +1392,7 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
@Override @Override
public void onLinkClick(String link, String orig, long accountId, long extraId, int type, boolean sensitive, int start, int end) { public void onLinkClick(String link, String orig, long accountId, long extraId, int type, boolean sensitive, int start, int end) {
final ParcelableStatus status = adapter.getStatus(); final ParcelableStatus status = adapter.getStatus();
ParcelableMedia current = null; ParcelableMedia current;
if ((current = ParcelableMedia.findByUrl(status.media, link)) != null) { if ((current = ParcelableMedia.findByUrl(status.media, link)) != null) {
expandOrOpenMedia(current); expandOrOpenMedia(current);
return; return;
@ -1402,7 +1402,7 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
return; return;
} }
if (type == TwidereLinkify.LINK_TYPE_STATUS && status.id == NumberUtils.toLong(link)) { if (type == TwidereLinkify.LINK_TYPE_STATUS && status.id == NumberUtils.toLong(link)) {
expandOrOpenMedia(current); expandOrOpenMedia(null);
return; return;
} }
super.onLinkClick(link, orig, accountId, extraId, type, sensitive, start, end); super.onLinkClick(link, orig, accountId, extraId, type, sensitive, start, end);

View File

@ -116,6 +116,7 @@ public class ColorPickerPreference extends DialogPreference implements DialogInt
if (listener != null) { if (listener != null) {
listener.onPreferenceChange(this, color); listener.onPreferenceChange(this, color);
} }
notifyChanged();
break; break;
} }
} }