Default submode 1 for search

This commit is contained in:
2026-06-24 00:08:15 +08:00
parent 83edbdac08
commit f8d65d7039
2 changed files with 12 additions and 2 deletions

View File

@@ -309,7 +309,14 @@ export class HighlightedMarkdown extends Component {
) : rule === 'search' ? (
<span className="search-query-highlight">{p}</span>
) : rule === 'tag' ? (
<a href={p}>{p}</a>
<a
href={p}
onClick={() => {
window.SEARCH_SUBMODE_BACKUP = 0;
}}
>
{p}
</a>
) : (
p
)}

View File

@@ -1430,7 +1430,10 @@ export class Flow extends PureComponent {
super(props);
let submode = window[props.mode.toUpperCase() + '_SUBMODE_BACKUP'];
if (submode === undefined) {
submode = props.mode === 'list' ? (window.config.by_c ? 1 : 0) : 0;
submode =
(props.mode === 'list' && window.config.by_c) || props.mode === 'search'
? 1
: 0;
}
this.state = {
submode: submode,