Fixed issue with sort and theme keys still being applied as GET parameters.
This commit is contained in:
@@ -48,8 +48,8 @@ def get_modification_timestamp(path_obj):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def build_query(search_text, sort_key, theme):
|
def build_query(search_text):
|
||||||
query = {"sort": sort_key, "theme": theme}
|
query = {}
|
||||||
|
|
||||||
if search_text != "":
|
if search_text != "":
|
||||||
query["search"] = search_text
|
query["search"] = search_text
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ def render_directory(request, path_text, full_path):
|
|||||||
theme = normalize_theme(
|
theme = normalize_theme(
|
||||||
request.GET.get("theme") or getattr(request, "theme", None) or "dark"
|
request.GET.get("theme") or getattr(request, "theme", None) or "dark"
|
||||||
)
|
)
|
||||||
query_state = build_query(search_text, sort_key, theme)
|
query_state = build_query(search_text)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
current_entries = [
|
current_entries = [
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ def render_image(request, path_text, full_path):
|
|||||||
theme = normalize_theme(
|
theme = normalize_theme(
|
||||||
request.GET.get("theme") or getattr(request, "theme", None) or "dark"
|
request.GET.get("theme") or getattr(request, "theme", None) or "dark"
|
||||||
)
|
)
|
||||||
query_state = build_query(search_text, sort_key, theme)
|
query_state = build_query(search_text)
|
||||||
|
|
||||||
image = Path("/imgs/").joinpath(path_text)
|
image = Path("/imgs/").joinpath(path_text)
|
||||||
img_dir = full_path.parent
|
img_dir = full_path.parent
|
||||||
|
|||||||
Reference in New Issue
Block a user