Remove search v1 (#1484)
* remove search v1, convert MastodonApi to Kotlin * format MastodonApi nicely * use default params in ConversationRepository * improve code for LoginActivity
This commit is contained in:
parent
73aaca9eea
commit
54a0d5406a
23 changed files with 698 additions and 660 deletions
|
@ -57,7 +57,7 @@ class AccountListFragment : BaseFragment(), AccountActionListener, Injectable {
|
|||
lateinit var api: MastodonApi
|
||||
|
||||
private lateinit var type: Type
|
||||
private var id: String? = null
|
||||
private lateinit var id: String
|
||||
private lateinit var scrollListener: EndlessOnScrollListener
|
||||
private lateinit var adapter: AccountAdapter
|
||||
private var fetching = false
|
||||
|
@ -66,7 +66,7 @@ class AccountListFragment : BaseFragment(), AccountActionListener, Injectable {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
type = arguments?.getSerializable(ARG_TYPE) as Type
|
||||
id = arguments?.getString(ARG_ID)
|
||||
id = arguments?.getString(ARG_ID)!!
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
|
|
|
@ -83,7 +83,7 @@ class AccountMediaFragment : BaseFragment(), RefreshableFragment, Injectable {
|
|||
private var fetchingStatus = FetchingStatus.NOT_FETCHING
|
||||
private var isVisibleToUser: Boolean = false
|
||||
|
||||
private var accountId: String?=null
|
||||
private lateinit var accountId: String
|
||||
|
||||
private val callback = object : Callback<List<Status>> {
|
||||
override fun onFailure(call: Call<List<Status>>?, t: Throwable?) {
|
||||
|
@ -165,8 +165,8 @@ class AccountMediaFragment : BaseFragment(), RefreshableFragment, Injectable {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
isSwipeToRefreshEnabled = arguments?.getBoolean(ARG_ENABLE_SWIPE_TO_REFRESH,true)==true
|
||||
accountId = arguments?.getString(ACCOUNT_ID_ARG)
|
||||
isSwipeToRefreshEnabled = arguments?.getBoolean(ARG_ENABLE_SWIPE_TO_REFRESH,true) == true
|
||||
accountId = arguments?.getString(ACCOUNT_ID_ARG)!!
|
||||
}
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue