Fixed Possible to break the search page
This commit is contained in:
Dusko Angirevic 2018-05-24 14:55:18 +02:00
parent 240d15dd8f
commit 0764b81cf3

View file

@ -106,9 +106,7 @@ Page {
onSearchChanged: { onSearchChanged: {
console.log(search) console.log(search)
loader.sourceComponent = loading loader.sourceComponent = loading
if (search !== ""){ loader.sourceComponent = search.charAt(0) === "@" ? userListComponent : tagListComponent
loader.sourceComponent = search.charAt(0) === "@" ? userListComponent : tagListComponent
}
} }
Loader { Loader {
@ -259,7 +257,7 @@ Page {
console.log(JSON.stringify(test.length)) console.log(JSON.stringify(test.length))
if (test.length === 5 && (test[3] === "tags" || test[3] === "tag") ) { if (test.length === 5 && (test[3] === "tags" || test[3] === "tag") ) {
tlSearch.search = "#"+decodeURIComponent(test[4]) tlSearch.search = "#"+decodeURIComponent(test[4])
slideshow.positionViewAtIndex(3, ListView.SnapToItem) slideshow.positionViewAtIndex(4, ListView.SnapToItem)
navigation.navigateTo('search') navigation.navigateTo('search')
} else { } else {