Fix image position and filter() return
This commit is contained in:
parent
c4f46f42b6
commit
7e62da8733
2
TODO.md
2
TODO.md
|
@ -30,3 +30,5 @@
|
|||
- Make links in room subtitle clickable, formatting?
|
||||
|
||||
- Push instead of replacing in stack view
|
||||
|
||||
- QQuickImageProvider, matrix preview API
|
||||
|
|
|
@ -52,7 +52,7 @@ class HtmlFilter(QObject):
|
|||
for el in tree.iter("a"):
|
||||
el = self._append_img_to_a(el)
|
||||
|
||||
return str(etree.tostring(tree[0][0], encoding="utf-8"), "utf-8")
|
||||
return str(etree.tostring(tree, encoding="utf-8"), "utf-8")
|
||||
|
||||
|
||||
@pyqtProperty("QVariant")
|
||||
|
@ -140,6 +140,7 @@ class HtmlFilter(QObject):
|
|||
for _ in el.iter("img"): # if the <a> already has an <img> child
|
||||
return el
|
||||
|
||||
el.append(etree.Element("br"))
|
||||
el.append(etree.Element("img", src=link, width="256", height="256"))
|
||||
return el
|
||||
|
||||
|
|
|
@ -24,5 +24,7 @@ Rectangle {
|
|||
// Keep x scroll pages cached, to limit images having to be
|
||||
// reloaded from network.
|
||||
cacheBuffer: height * 6
|
||||
|
||||
//Component.onCompleted: positionViewAtEnd()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user