fixed #279
This commit is contained in:
parent
4259be7c23
commit
4cd79dc78c
|
@ -351,4 +351,8 @@ public class TwitterContentUtils {
|
|||
else
|
||||
return "ipad_retina";
|
||||
}
|
||||
|
||||
public static long getOriginalId(@NonNull ParcelableStatus status) {
|
||||
return status.is_retweet ? status.retweet_id : status.id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ import org.mariotaku.twidere.util.TwidereLinkify;
|
|||
import org.mariotaku.twidere.util.TwidereMathUtils;
|
||||
import org.mariotaku.twidere.util.TwitterAPIFactory;
|
||||
import org.mariotaku.twidere.util.TwitterCardUtils;
|
||||
import org.mariotaku.twidere.util.TwitterContentUtils;
|
||||
import org.mariotaku.twidere.util.UserColorNameManager;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.message.FavoriteCreatedEvent;
|
||||
|
@ -1846,11 +1847,13 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
|
|||
return mTranslationResult;
|
||||
}
|
||||
|
||||
public void setTranslationResult(TranslationResult translation) {
|
||||
if (mStatus == null || (translation != null && mStatus.id != translation.getId())) {
|
||||
return;
|
||||
public void setTranslationResult(@Nullable TranslationResult translation) {
|
||||
if (mStatus == null || translation == null || TwitterContentUtils.getOriginalId(mStatus)
|
||||
!= translation.getId()) {
|
||||
mTranslationResult = null;
|
||||
} else {
|
||||
mTranslationResult = translation;
|
||||
}
|
||||
mTranslationResult = translation;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue