mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.4.1'
This commit is contained in:
@@ -21,15 +21,15 @@ public class Xowe_page_mgr {
|
||||
private final Xowe_wiki wiki;
|
||||
public Xowe_page_mgr(Xowe_wiki wiki) {this.wiki = wiki;}
|
||||
public Xoae_page Load_page(Xoa_url url, Xoa_ttl ttl, Xog_tab_itm tab) {
|
||||
Xoa_app_.Usr_dlg().Log_many("", "", "page.load: url=~{0}", url.To_str());
|
||||
Wait_for_popups();
|
||||
Xoa_app_.Usr_dlg().Log_many("", "", "page.load: url=~{0}", url.To_str());
|
||||
Wait_for_popups(wiki.App());
|
||||
Xowe_wiki_.Rls_mem_if_needed(wiki);
|
||||
|
||||
// load page meta; wait_for_popups
|
||||
Xoae_page page = wiki.Data_mgr().Load_page_and_parse(url, ttl, wiki.Lang(), tab, false);
|
||||
boolean hdump_exists = page.Revision_data().Html_db_id() != -1 && wiki.Appe().Api_root().Wiki().Hdump().Read_preferred();
|
||||
page.Html_data().Hdump_exists_(hdump_exists);
|
||||
Wait_for_popups();
|
||||
Wait_for_popups(wiki.App());
|
||||
|
||||
// load page text
|
||||
boolean parse = true;
|
||||
@@ -41,7 +41,8 @@ public class Xowe_page_mgr {
|
||||
wiki.Parser_mgr().Parse(page, false);
|
||||
return page;
|
||||
}
|
||||
private static void Wait_for_popups() {// HACK: wait for popups to finish, else thread errors due to popups and loader mutating cached items
|
||||
private static void Wait_for_popups(Xoa_app app) {// HACK: wait for popups to finish, else thread errors due to popups and loader mutating cached items
|
||||
if (app.Mode().Tid_is_http()) return;
|
||||
int wait_count = 0;
|
||||
while (gplx.xowa.htmls.modules.popups.Xow_popup_mgr.Running() && ++wait_count < 100)
|
||||
gplx.core.threads.Thread_adp_.Sleep(10);
|
||||
|
||||
@@ -20,11 +20,10 @@ import gplx.xowa.wikis.nss.*; import gplx.xowa.parsers.lnkis.*;
|
||||
public class Xopg_lnki_list {
|
||||
private final List_adp list = List_adp_.New();
|
||||
private int lnki_idx;
|
||||
public Xopg_lnki_list(boolean ttl_is_module) { // never redlink in Module ns; particularly since Lua has multi-line comments for [[ ]]
|
||||
this.disabled = ttl_is_module;
|
||||
public Xopg_lnki_list() {
|
||||
this.Clear();
|
||||
}
|
||||
public boolean Disabled() {return disabled;} private final boolean disabled;
|
||||
public boolean Disabled() {return disabled;} private boolean disabled; public Xopg_lnki_list Disabled_(boolean v) {this.disabled = v; return this;}
|
||||
public int Len() {return list.Len();}
|
||||
public Xopg_lnki_itm Get_at(int i) {return (Xopg_lnki_itm)list.Get_at(i);}
|
||||
public void Add_direct(Xopg_lnki_itm lnki) {list.Add(lnki);} // add lnki directly to list without changing html_uid; needed for hdumps which call "Fill_page" to transfer from Xoh_page to Xoae_page
|
||||
|
||||
Reference in New Issue
Block a user