зеркало из https://github.com/mozilla/gecko-dev.git
Bug 920935 - Reading list items opened using keywords are not opened in Reading List. r=lucasr
This commit is contained in:
Родитель
c90e808628
Коммит
1777426401
|
@ -37,6 +37,7 @@ import org.json.JSONObject;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
|
@ -1484,6 +1485,15 @@ abstract public class BrowserApp extends GeckoApp
|
|||
return;
|
||||
}
|
||||
|
||||
// If the keywordUrl is in ReadingList, convert the url to an about:reader url and load it.
|
||||
final ContentResolver cr = getContentResolver();
|
||||
final boolean inReadingList = BrowserDB.isReadingListItem(cr, keywordUrl);
|
||||
if (inReadingList) {
|
||||
final String readerUrl = ReaderModeUtils.getAboutReaderForUrl(keywordUrl);
|
||||
Tabs.getInstance().loadUrl(readerUrl, Tabs.LOADURL_USER_ENTERED);
|
||||
return;
|
||||
}
|
||||
|
||||
recordSearch(null, "barkeyword");
|
||||
|
||||
// Otherwise, construct a search query from the bookmark keyword.
|
||||
|
|
Загрузка…
Ссылка в новой задаче