mirror of
https://github.com/gnosygnu/xowa.git
synced 2025-05-31 22:44:34 +00:00
Html_dump: Always reload page when going back / forward on wikinews (do not use cached html)
This commit is contained in:
parent
578ede9b1c
commit
6ad12f4df9
@ -82,6 +82,7 @@ public class Xof_fsdb_itm implements Xof_file_itm {
|
||||
this.lnki_w = file_w; this.lnki_h = Xof_img_size.Size__neg1;
|
||||
}
|
||||
public void Init_at_html(int exec_tid, Xof_img_size img_size, Xof_repo_itm repo, Xof_url_bldr url_bldr) {
|
||||
int j = 1;
|
||||
Calc_html_size(exec_tid, img_size);
|
||||
this.html_view_url = url_bldr.To_url_trg(repo, this, file_is_orig);
|
||||
this.html_orig_url = url_bldr.To_url_trg(repo, this, Bool_.Y);
|
||||
@ -148,7 +149,9 @@ public class Xof_fsdb_itm implements Xof_file_itm {
|
||||
public void Change_repo(byte orig_repo_id, byte[] orig_repo_name) {
|
||||
this.orig_repo_id = orig_repo_id; this.orig_repo_name = orig_repo_name;
|
||||
}
|
||||
public void File_is_orig_(boolean v) {this.file_is_orig = v;}
|
||||
public void File_is_orig_(boolean v) {
|
||||
this.file_is_orig = v;
|
||||
}
|
||||
public void Orig_repo_name_(byte[] v) {orig_repo_name = v;}
|
||||
public void Html_elem_tid_(byte v) {this.html_elem_tid = v;}
|
||||
public void Html_size_(int w, int h) {html_w = w; html_h = h;}
|
||||
|
@ -192,6 +192,13 @@ public class Xog_win_itm implements Gfo_invk, Gfo_evt_itm {
|
||||
if (new_page.Db().Page().Exists_n()) return;
|
||||
if (new_page.Ttl().Ns().Id_is_special()) // if Special, reload page; needed for Special:Search (DATE:2015-04-19; async loading) and Special:XowaBookmarks DATE:2015-10-05
|
||||
new_page = new_page.Wikie().Data_mgr().Load_page_and_parse(new_page.Url(), new_page.Ttl()); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save
|
||||
else {
|
||||
// WORKAROUND: if wikinews, then reload page; DATE:2016-11-03
|
||||
// fixes bug wherein dump_html points images to wrong repo and causes images to be blank when going backwards / forwards
|
||||
// note that this workaround will cause Wikitext Wikinews pages to reload page when going bwd / fwd, but this should be a smalldifference
|
||||
if (cur_wiki.Domain_tid() == gplx.xowa.wikis.domains.Xow_domain_tid_.Tid__wikinews)
|
||||
new_page = new_page.Wikie().Page_mgr().Load_page(new_page.Url(), new_page.Ttl(), tab);
|
||||
}
|
||||
byte history_nav_type = fwd ? Xog_history_stack.Nav_fwd : Xog_history_stack.Nav_bwd;
|
||||
boolean new_page_is_same = Bry_.Eq(cur_page.Ttl().Full_txt_by_orig(), new_page.Ttl().Full_txt_by_orig());
|
||||
Xog_tab_itm_read_mgr.Show_page(tab, new_page, true, new_page_is_same, false, history_nav_type);
|
||||
|
Loading…
Reference in New Issue
Block a user