mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-21 13:25:03 +00:00
remove old customTitle method
This commit is contained in:
parent
47f1daf6bd
commit
d58543adcc
21 changed files with 0 additions and 131 deletions
|
|
@ -105,10 +105,6 @@ abstract class BaseMainFragment : BaseFragment() {
|
|||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
open fun customTitle(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
fun hideToolbar() {
|
||||
activity?.avatarWithBars?.visibility = View.GONE
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -47,9 +46,4 @@ class NewsFragment : BaseMainFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_news)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,10 +284,4 @@ class StatsFragment: BaseMainFragment() {
|
|||
}, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_stats)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.faq
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -66,9 +63,4 @@ class FAQOverviewFragment : BaseMainFragment() {
|
|||
compositeSubscription.add(faqRepository.getArticles().subscribe(Consumer { adapter?.setArticles(it) }, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.FAQ)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,9 +105,4 @@ class AvatarOverviewFragment : BaseMainFragment(), AdapterView.OnItemSelectedLis
|
|||
override fun onNothingSelected(parent: AdapterView<*>) {}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_avatar)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,10 +120,4 @@ class EquipmentOverviewFragment : BaseMainFragment() {
|
|||
MainNavigationController.navigate(EquipmentOverviewFragmentDirections.openEquipmentDetail(type, isCostume ?: false, equipped ?: ""))
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_equipment)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ package com.habitrpg.android.habitica.ui.fragments.inventory.items
|
|||
|
||||
import android.os.Bundle
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -113,9 +111,4 @@ class ItemsFragment : BaseMainFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_items)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.inventory.shops
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -93,12 +92,6 @@ class ShopsFragment : BaseMainFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_shops)
|
||||
}
|
||||
|
||||
override fun updateUserData(user: User?) {
|
||||
super.updateUserData(user)
|
||||
updateCurrencyView()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.inventory.stable
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -14,7 +12,6 @@ import com.habitrpg.android.habitica.extensions.notNull
|
|||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.ui.adapter.inventory.MountDetailRecyclerAdapter
|
||||
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.inventory.customization.AvatarCustomizationFragmentArgs
|
||||
import com.habitrpg.android.habitica.ui.helpers.MarginDecoration
|
||||
import com.habitrpg.android.habitica.ui.helpers.SafeDefaultItemAnimator
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
|
|
@ -106,12 +103,6 @@ class MountDetailRecyclerFragment : BaseMainFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.mounts)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ANIMAL_TYPE_KEY = "ANIMAL_TYPE_KEY"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.inventory.stable
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -125,12 +123,6 @@ class PetDetailRecyclerFragment : BaseMainFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.pets)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ANIMAL_TYPE_KEY = "ANIMAL_TYPE_KEY"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.inventory.stable
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -76,9 +74,4 @@ class StableFragment : BaseMainFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_stable)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import android.content.Intent
|
|||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -168,9 +166,4 @@ class SkillsFragment : BaseMainFragment() {
|
|||
progressDialog?.dismiss()
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_skills)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import android.content.Intent
|
|||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
|
|
@ -227,9 +226,4 @@ class GuildFragment : BaseMainFragment() {
|
|||
this.activity?.invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.guild)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.habitrpg.android.habitica.ui.fragments.social
|
|||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -111,11 +110,4 @@ class GuildsOverviewFragment : BaseMainFragment(), View.OnClickListener, android
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (isAdded) {
|
||||
getString(R.string.sidebar_guilds)
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.habitrpg.android.habitica.ui.fragments.social
|
|||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.view.*
|
||||
import android.widget.EditText
|
||||
|
|
@ -166,9 +165,4 @@ class InboxFragment : BaseMainFragment(), androidx.swiperefreshlayout.widget.Swi
|
|||
MainNavigationController.navigate(InboxFragmentDirections.openInboxDetail(userID, username))
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_inbox)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,4 @@ class InboxMessageListFragment : BaseMainFragment(), androidx.swiperefreshlayout
|
|||
}
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return chatRoomUser ?: ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ package com.habitrpg.android.habitica.ui.fragments.social
|
|||
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import android.view.*
|
||||
import com.habitrpg.android.habitica.R
|
||||
|
|
@ -95,9 +92,4 @@ class PublicGuildsFragment : BaseMainFragment(), SearchView.OnQueryTextListener
|
|||
return true
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.public_guilds)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,9 +96,4 @@ class TavernFragment : BaseMainFragment() {
|
|||
tabLayout?.setupWithViewPager(viewPager)
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_tavern)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.habitrpg.android.habitica.ui.fragments.social.challenges
|
|||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -88,9 +87,4 @@ class ChallengesOverviewFragment : BaseMainFragment() {
|
|||
statePagerAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.challenges)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import com.habitrpg.android.habitica.ui.activities.GroupFormActivity
|
|||
import com.habitrpg.android.habitica.ui.activities.PartyInviteActivity
|
||||
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.ChatFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.ChatListFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.GroupInformationFragment
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.helpers.resetViews
|
||||
|
|
@ -276,10 +275,4 @@ class PartyFragment : BaseMainFragment() {
|
|||
}
|
||||
|
||||
|
||||
override fun customTitle(): String {
|
||||
return if (!isAdded) {
|
||||
""
|
||||
} else getString(R.string.sidebar_party)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,8 +368,6 @@ class TasksFragment : BaseMainFragment() {
|
|||
override val displayedClassName: String?
|
||||
get() = null
|
||||
|
||||
override fun customTitle(): String = ""
|
||||
|
||||
override fun addToBackStack(): Boolean = false
|
||||
|
||||
companion object {
|
||||
|
|
|
|||
Loading…
Reference in a new issue