diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt index d92c3cd6f..4900a8430 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt @@ -16,7 +16,7 @@ import eu.davidea.flexibleadapter.common.SmoothScrollLinearLayoutManager import eu.davidea.flexibleadapter.items.AbstractFlexibleItem import io.github.wulkanowy.R import io.github.wulkanowy.ui.base.BaseFragment -import io.github.wulkanowy.ui.modules.about.creator.CreatorFragment +import io.github.wulkanowy.ui.modules.about.contributor.ContributorFragment import io.github.wulkanowy.ui.modules.about.license.LicenseFragment import io.github.wulkanowy.ui.modules.about.logviewer.LogViewerFragment import io.github.wulkanowy.ui.modules.main.MainActivity @@ -155,7 +155,7 @@ class AboutFragment : BaseFragment(), AboutView, MainView.TitledView { } override fun openCreators() { - (activity as? MainActivity)?.pushView(CreatorFragment.newInstance()) + (activity as? MainActivity)?.pushView(ContributorFragment.newInstance()) } override fun openPrivacyPolicy() { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorFragment.kt similarity index 86% rename from app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt rename to app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorFragment.kt index 299657ba6..c181c3d38 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorFragment.kt @@ -1,4 +1,4 @@ -package io.github.wulkanowy.ui.modules.about.creator +package io.github.wulkanowy.ui.modules.about.contributor import android.os.Bundle import android.view.LayoutInflater @@ -18,18 +18,18 @@ import io.github.wulkanowy.utils.setOnItemClickListener import kotlinx.android.synthetic.main.fragment_creator.* import javax.inject.Inject -class CreatorFragment : BaseFragment(), CreatorView, MainView.TitledView { +class ContributorFragment : BaseFragment(), ContributorView, MainView.TitledView { @Inject - lateinit var presenter: CreatorPresenter + lateinit var presenter: ContributorPresenter @Inject lateinit var creatorsAdapter: FlexibleAdapter> - override val titleStringId get() = R.string.creators_title + override val titleStringId get() = R.string.contributors_title companion object { - fun newInstance() = CreatorFragment() + fun newInstance() = ContributorFragment() } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { @@ -53,7 +53,7 @@ class CreatorFragment : BaseFragment(), CreatorView, MainView.TitledView { creatorSeeMore.setOnClickListener { presenter.onSeeMoreClick() } } - override fun updateData(data: List) { + override fun updateData(data: List) { creatorsAdapter.updateDataSet(data) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorItem.kt similarity index 88% rename from app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt rename to app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorItem.kt index 909919bbc..499982332 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorItem.kt @@ -1,4 +1,4 @@ -package io.github.wulkanowy.ui.modules.about.creator +package io.github.wulkanowy.ui.modules.about.contributor import android.view.View import coil.api.load @@ -12,7 +12,8 @@ import io.github.wulkanowy.data.pojos.AppCreator import kotlinx.android.extensions.LayoutContainer import kotlinx.android.synthetic.main.item_creator.* -class CreatorItem(val creator: AppCreator) : AbstractFlexibleItem() { +class ContributorItem(val creator: AppCreator) : + AbstractFlexibleItem() { override fun getLayoutRes() = R.layout.item_creator @@ -33,7 +34,7 @@ class CreatorItem(val creator: AppCreator) : AbstractFlexibleItem(errorHandler, studentRepository, schedulers) { +) : BasePresenter(errorHandler, studentRepository, schedulers) { - override fun onAttachView(view: CreatorView) { + override fun onAttachView(view: ContributorView) { super.onAttachView(view) view.initView() loadData() } fun onItemSelected(item: AbstractFlexibleItem<*>) { - if (item !is CreatorItem) return + if (item !is ContributorItem) return view?.openUserGithubPage(item.creator.githubUsername) } @@ -34,7 +32,7 @@ class CreatorPresenter @Inject constructor( private fun loadData() { disposable.add(appCreatorRepository.getAppCreators() - .map { it.map { creator -> CreatorItem(creator) } } + .map { it.map { creator -> ContributorItem(creator) } } .subscribeOn(schedulers.backgroundThread) .observeOn(schedulers.mainThread) .doFinally { view?.showProgress(false) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorView.kt similarity index 56% rename from app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt rename to app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorView.kt index 2a6a43039..18ec3a8ec 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/contributor/ContributorView.kt @@ -1,12 +1,12 @@ -package io.github.wulkanowy.ui.modules.about.creator +package io.github.wulkanowy.ui.modules.about.contributor import io.github.wulkanowy.ui.base.BaseView -interface CreatorView : BaseView { +interface ContributorView : BaseView { fun initView() - fun updateData(data: List) + fun updateData(data: List) fun openUserGithubPage(username: String) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt index b3a9e4a0a..dbcba4306 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt @@ -8,7 +8,7 @@ import dagger.android.ContributesAndroidInjector import io.github.wulkanowy.R import io.github.wulkanowy.di.scopes.PerFragment import io.github.wulkanowy.ui.modules.about.AboutFragment -import io.github.wulkanowy.ui.modules.about.creator.CreatorFragment +import io.github.wulkanowy.ui.modules.about.contributor.ContributorFragment import io.github.wulkanowy.ui.modules.about.license.LicenseFragment import io.github.wulkanowy.ui.modules.about.license.LicenseModule import io.github.wulkanowy.ui.modules.about.logviewer.LogViewerFragment @@ -128,7 +128,7 @@ abstract class MainModule { @PerFragment @ContributesAndroidInjector() - abstract fun bindCreatorsFragment(): CreatorFragment + abstract fun bindContributorFragment(): ContributorFragment @PerFragment @ContributesAndroidInjector(modules = [SchoolAndTeachersModule::class]) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index c3c63b1eb..5e347b57d 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -15,7 +15,7 @@ Więcej O aplikacji Przeglądarka logów - Twórcy + Twórcy Licencje Wiadomości Nowa wiadomość diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 639d50df4..444335b41 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -15,7 +15,7 @@ Ещё О приложении Просмотр журнала - Творцы + Творцы Лицензии Сообщения Новое сообщение diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 07d2f7f2f..3d958d129 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -14,8 +14,8 @@ Налаштування Ще Про додаток - Log viewer - Creators + Переглядач журналів + Творці Ліцензії Повідомлення Нове повідомлення diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 532e98cfa..54080e955 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,7 +15,7 @@ More About Log viewer - Creators + Contributors Licenses Messages New message @@ -272,7 +272,7 @@ App version - Creators + Contributors List of Wulkanowy developers Report a bug Send a bug report via e-mail @@ -296,6 +296,7 @@ Avatar See more on GitHub + Share logs Refresh