forked from github/wulkanowy-mirror
Restore lucky number in more view (#1504)
This commit is contained in:
parent
0389642543
commit
91f6310892
@ -11,6 +11,7 @@ import io.github.wulkanowy.ui.base.BaseFragment
|
|||||||
import io.github.wulkanowy.ui.modules.conference.ConferenceFragment
|
import io.github.wulkanowy.ui.modules.conference.ConferenceFragment
|
||||||
import io.github.wulkanowy.ui.modules.exam.ExamFragment
|
import io.github.wulkanowy.ui.modules.exam.ExamFragment
|
||||||
import io.github.wulkanowy.ui.modules.homework.HomeworkFragment
|
import io.github.wulkanowy.ui.modules.homework.HomeworkFragment
|
||||||
|
import io.github.wulkanowy.ui.modules.luckynumber.LuckyNumberFragment
|
||||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.ui.modules.message.MessageFragment
|
import io.github.wulkanowy.ui.modules.message.MessageFragment
|
||||||
@ -66,6 +67,9 @@ class MoreFragment : BaseFragment<FragmentMoreBinding>(R.layout.fragment_more),
|
|||||||
override val examRes: Pair<String, Drawable?>?
|
override val examRes: Pair<String, Drawable?>?
|
||||||
get() = context?.run { getString(R.string.exam_title) to getCompatDrawable(R.drawable.ic_main_exam) }
|
get() = context?.run { getString(R.string.exam_title) to getCompatDrawable(R.drawable.ic_main_exam) }
|
||||||
|
|
||||||
|
override val luckyNumberRes: Pair<String, Drawable?>?
|
||||||
|
get() = context?.run { getString(R.string.lucky_number_title) to getCompatDrawable(R.drawable.ic_more_lucky_number) }
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
binding = FragmentMoreBinding.bind(view)
|
binding = FragmentMoreBinding.bind(view)
|
||||||
@ -128,6 +132,10 @@ class MoreFragment : BaseFragment<FragmentMoreBinding>(R.layout.fragment_more),
|
|||||||
(activity as? MainActivity)?.pushView(ExamFragment.newInstance())
|
(activity as? MainActivity)?.pushView(ExamFragment.newInstance())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openLuckyNumberView() {
|
||||||
|
(activity as? MainActivity)?.pushView(LuckyNumberFragment.newInstance())
|
||||||
|
}
|
||||||
|
|
||||||
override fun popView(depth: Int) {
|
override fun popView(depth: Int) {
|
||||||
(activity as? MainActivity)?.popView(depth)
|
(activity as? MainActivity)?.popView(depth)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ class MorePresenter @Inject constructor(
|
|||||||
schoolAndTeachersRes?.first -> openSchoolAndTeachersView()
|
schoolAndTeachersRes?.first -> openSchoolAndTeachersView()
|
||||||
mobileDevicesRes?.first -> openMobileDevicesView()
|
mobileDevicesRes?.first -> openMobileDevicesView()
|
||||||
settingsRes?.first -> openSettingsView()
|
settingsRes?.first -> openSettingsView()
|
||||||
|
luckyNumberRes?.first -> openLuckyNumberView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,6 +49,7 @@ class MorePresenter @Inject constructor(
|
|||||||
examRes,
|
examRes,
|
||||||
homeworkRes,
|
homeworkRes,
|
||||||
noteRes,
|
noteRes,
|
||||||
|
luckyNumberRes,
|
||||||
conferencesRes,
|
conferencesRes,
|
||||||
schoolAnnouncementRes,
|
schoolAnnouncementRes,
|
||||||
schoolAndTeachersRes,
|
schoolAndTeachersRes,
|
||||||
|
@ -23,6 +23,8 @@ interface MoreView : BaseView {
|
|||||||
|
|
||||||
val examRes: Pair<String, Drawable?>?
|
val examRes: Pair<String, Drawable?>?
|
||||||
|
|
||||||
|
val luckyNumberRes: Pair<String, Drawable?>?
|
||||||
|
|
||||||
fun initView()
|
fun initView()
|
||||||
|
|
||||||
fun updateData(data: List<Pair<String, Drawable?>>)
|
fun updateData(data: List<Pair<String, Drawable?>>)
|
||||||
@ -46,4 +48,6 @@ interface MoreView : BaseView {
|
|||||||
fun openMobileDevicesView()
|
fun openMobileDevicesView()
|
||||||
|
|
||||||
fun openExamView()
|
fun openExamView()
|
||||||
|
|
||||||
|
fun openLuckyNumberView()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user