This commit is contained in:
Mariotaku Lee 2016-12-14 17:12:49 +08:00
parent a498318334
commit f56df676d0
5 changed files with 12 additions and 8 deletions

View File

@ -35,7 +35,7 @@ public class ParcelableDirectMessageUtils {
final Pair<String, SpanItem[]> pair = InternalTwitterContentUtils.formatDirectMessageText(message);
result.text_unescaped = pair.first;
result.spans = pair.second;
result.text_plain = message.getText();
result.text_plain = InternalTwitterContentUtils.unescapeTwitterStatusText(message.getText());
result.sender_name = sender.getName();
result.recipient_name = recipient.getName();
result.sender_screen_name = sender.getScreenName();

View File

@ -217,7 +217,7 @@ public class InternalTwitterContentUtils {
@NonNull
public static Pair<String, SpanItem[]> formatDirectMessageText(@NonNull final DirectMessage message) {
final HtmlBuilder builder = new HtmlBuilder(message.getText(), false, true, true);
final HtmlBuilder builder = new HtmlBuilder(message.getText(), false, true, false);
parseEntities(builder, message);
return builder.buildWithIndices();
}

View File

@ -223,9 +223,8 @@ class DirectMessagesFragment : AbsContentListRecyclerViewFragment<MessageEntries
override fun doInBackground(vararg params: Any): RefreshTaskParam? {
val context = context ?: return null
val accountIds = accountKeys
val ids = DataStoreUtils.getNewestMessageIds(context,
Inbox.CONTENT_URI, accountIds)
return BaseRefreshTaskParam(accountIds, ids, null)
val ids = DataStoreUtils.getNewestMessageIds(context, Inbox.CONTENT_URI, accountIds)
return BaseRefreshTaskParam(accountIds, maxIds = null, sinceIds = ids)
}
override fun onPostExecute(result: RefreshTaskParam?) {

View File

@ -31,7 +31,12 @@ import java.io.File
/**
* Created by mariotaku on 15/12/28.
*/
class SaveMediaToGalleryTask(activity: Activity, source: Uri, destination: File, type: String) : ProgressSaveFileTask(activity, source, destination, CacheProvider.CacheFileTypeCallback(activity, type)) {
class SaveMediaToGalleryTask(
activity: Activity,
source: Uri,
destination: File,
type: String
) : ProgressSaveFileTask(activity, source, destination, CacheProvider.CacheFileTypeCallback(activity, type)) {
override fun onFileSaved(savedFile: File, mimeType: String?) {
val context = context ?: return

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="use_job_refresh_service">true</bool>
<bool name="use_legacy_refresh_service">false</bool>
<!--<bool name="use_job_refresh_service">true</bool>-->
<!--<bool name="use_legacy_refresh_service">false</bool>-->
</resources>