Ignore 'the' prefix when sorting - fixes #204
This commit is contained in:
@@ -413,9 +413,11 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
|||||||
order = False
|
order = False
|
||||||
|
|
||||||
def get_value(index: int) -> str:
|
def get_value(index: int) -> str:
|
||||||
return str(
|
return (
|
||||||
getattr((child1.get_child(), child2.get_child())[index], var)
|
str(getattr((child1.get_child(), child2.get_child())[index], var))
|
||||||
).lower()
|
.lower()
|
||||||
|
.removeprefix("the ")
|
||||||
|
)
|
||||||
|
|
||||||
if var != "name" and get_value(0) == get_value(1):
|
if var != "name" and get_value(0) == get_value(1):
|
||||||
var, order = "name", False
|
var, order = "name", False
|
||||||
|
|||||||
Reference in New Issue
Block a user