Improve search results (#1327)

* Add entities and request for search APIv2

* Implement search adapter and fragment

* Fix issue with snackbar

* Implement search accounts fragment

* Implement generic search fragment

* Remove unneeded import

* Implement "status" actions, fix issues

* Remove SFragment dependency

* Update app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt

Co-Authored-By: Konrad Pozniak <connyduck@users.noreply.github.com>

* Clean-up post review suggestions

* Make TabLayout background colour match search bar

* Corrected method call syntax

* Added SwipeRefreshLayout to SearchFragment

* Fixed refresh to update all three tabs
This commit is contained in:
pandasoft0 2019-07-19 21:10:20 +03:00 committed by Konrad Pozniak
commit 3b1288e99c
36 changed files with 1666 additions and 489 deletions

View file

@ -0,0 +1,3 @@
package com.keylesspalace.tusky.entity
data class HashTag(val name: String)

View file

@ -0,0 +1,14 @@
package com.keylesspalace.tusky.entity
import com.google.gson.annotations.SerializedName
data class History(
@field:SerializedName("day")
val day: String,
@field:SerializedName("uses")
val uses: Int,
@field:SerializedName("accounts")
val accounts: Int
)

View file

@ -0,0 +1,22 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky.entity
data class SearchResults2 (
val accounts: List<Account>,
val statuses: List<Status>,
val hashtags: List<HashTag>
)