From de73b6c47b975b19f4f3af879055af2dc2ae6f9f Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 21 Jan 2018 17:25:00 +0100 Subject: [PATCH] Improved RelatedActivity. Beta 0.5.0 --- app/build.gradle | 4 +- .../wykopmobilny/api/links/LinksApi.kt | 3 + .../wykopmobilny/api/links/LinksRepository.kt | 11 +++ .../api/links/LinksRetrofitApi.kt | 6 ++ .../wykopmobilny/models/dataclass/Related.kt | 5 +- .../models/fragments/SortedPagedDataModel.kt | 3 + .../models/mapper/apiv2/RelatedMapper.kt | 2 +- .../pojo/apiv2/models/RelatedResponse.kt | 12 ++- .../ui/adapters/RelatedListAdapter.kt | 5 +- .../adapters/viewholders/RelatedViewHolder.kt | 5 +- .../ui/modules/favorite/FavoriteFragment.kt | 10 +++ .../favorite/FavoriteFragmentNotifier.kt | 5 ++ .../modules/favorite/FavoritePagerAdapter.kt | 23 ++++- .../favorite/entry/EntryFavoriteFragment.kt | 9 +- .../favorite/links/LinksFavoriteFragment.kt | 9 +- .../links/linkdetails/LinkDetailsActivity.kt | 27 +++--- .../links/upcoming/UpcomingFragment.kt | 33 ++++--- .../mainnavigation/MainNavigationActivity.kt | 50 +++++++++-- .../ui/modules/search/SearchPagerAdapter.kt | 2 - .../ui/widgets/link/LinkWidget.kt | 5 ++ .../widgets/link/comment/LinkCommentWidget.kt | 1 + .../ui/widgets/link/related/RelatedWidget.kt | 77 ++++++++++++++++- .../link/related/RelatedWidgetPresenter.kt | 28 ++++++ .../related/RelatedWidgetPresenterFactory.kt | 11 +++ .../widgets/link/related/RelatedWidgetView.kt | 6 +- .../main/res/layout/app_about_bottomsheet.xml | 85 +++++++++++++++++++ app/src/main/res/layout/dialog_voters.xml | 4 +- .../main/res/layout/link_related_layout.xml | 13 ++- app/src/main/res/layout/toolbar.xml | 1 + app/src/main/res/values/strings.xml | 4 + 30 files changed, 399 insertions(+), 60 deletions(-) create mode 100755 app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/fragments/SortedPagedDataModel.kt create mode 100644 app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragmentNotifier.kt create mode 100644 app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenterFactory.kt create mode 100755 app/src/main/res/layout/app_about_bottomsheet.xml diff --git a/app/build.gradle b/app/build.gradle index e134e7cda..854feb83a 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "io.github.feelfreelinux.wykopmobilny" minSdkVersion 17 targetSdkVersion 27 - versionCode 19 - versionName "0.4.2" + versionCode 20 + versionName "0.5.0" def credentialsPropertiesFile = rootProject.file("credentials.properties") def credentialsProperties = new Properties() diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksApi.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksApi.kt index 6a95d7ffa..b0b330803 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksApi.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksApi.kt @@ -5,6 +5,7 @@ import io.github.feelfreelinux.wykopmobilny.models.dataclass.* import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.DigResponse import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.FavoriteResponse import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.LinkVoteResponse +import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.VoteResponse import io.reactivex.Single interface LinksApi { @@ -17,6 +18,8 @@ interface LinksApi { fun commentVoteUp(linkId: Int) : Single fun commentVoteDown(linkId: Int) : Single + fun relatedVoteUp(relatedId: Int) : Single + fun relatedVoteDown(relatedId: Int) : Single fun commentVoteCancel(linkId: Int) : Single fun commentDelete(commentId: Int) : Single fun commentAdd(body : String, diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRepository.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRepository.kt index 610efdf22..d164124ad 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRepository.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRepository.kt @@ -57,6 +57,17 @@ class LinksRepository(val retrofit: Retrofit, val userTokenRefresher: UserTokenR .retryWhen(userTokenRefresher) .compose(ErrorHandlerTransformer()) + override fun relatedVoteUp(relatedId: Int): Single = + linksApi.relatedVoteUp(relatedId) + .retryWhen(userTokenRefresher) + .compose(ErrorHandlerTransformer()) + + + override fun relatedVoteDown(relatedId: Int): Single = + linksApi.relatedVoteDown(relatedId) + .retryWhen(userTokenRefresher) + .compose(ErrorHandlerTransformer()) + override fun commentVoteCancel(linkId: Int): Single = linksApi.commentVoteCancel(linkId) .retryWhen(userTokenRefresher) diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRetrofitApi.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRetrofitApi.kt index d8f8e49b6..35f77bf53 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRetrofitApi.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/api/links/LinksRetrofitApi.kt @@ -52,6 +52,12 @@ interface LinksRetrofitApi { fun voteDown(@Path("linkId") linkId : Int, @Path("voteType") reason : Int) : Single> + @GET("/links/relatedvoteup/0/{relatedId}/appkey/$APP_KEY") + fun relatedVoteUp(@Path("relatedId") relatedId : Int) : Single> + + @GET("/links/relatedvotedown/1/{relatedId}/appkey/$APP_KEY") + fun relatedVoteDown(@Path("relatedId") relatedId : Int) : Single> + @GET("/links/voteremove/{linkId}/appkey/$APP_KEY") fun voteRemove(@Path("linkId") linkId : Int) : Single> diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/dataclass/Related.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/dataclass/Related.kt index a2d984b3b..af660d033 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/dataclass/Related.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/dataclass/Related.kt @@ -3,7 +3,8 @@ package io.github.feelfreelinux.wykopmobilny.models.dataclass data class Related( val id : Int, val url : String, - val voteCount : Int, + var voteCount : Int, val author : Author, - val title : String + val title : String, + var userVote : Int ) \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/fragments/SortedPagedDataModel.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/fragments/SortedPagedDataModel.kt new file mode 100755 index 000000000..1b4e9a826 --- /dev/null +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/fragments/SortedPagedDataModel.kt @@ -0,0 +1,3 @@ +package io.github.feelfreelinux.wykopmobilny.models.fragments + +data class SortedPagedDataModel (val page : Int, val sortby : String, val model : T) \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/mapper/apiv2/RelatedMapper.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/mapper/apiv2/RelatedMapper.kt index 2d29e4667..7cae70f29 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/mapper/apiv2/RelatedMapper.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/mapper/apiv2/RelatedMapper.kt @@ -7,7 +7,7 @@ import io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models.RelatedResp class RelatedMapper { companion object : Mapper { override fun map(value: RelatedResponse): Related { - return Related(value.id, value.url, value.voteCount, AuthorMapper.map(value.author), value.title) + return Related(value.id, value.url, value.voteCount, AuthorMapper.map(value.author), value.title, value.userVote ?: 0) } } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/pojo/apiv2/models/RelatedResponse.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/pojo/apiv2/models/RelatedResponse.kt index f8e9d7f6a..e66307d9d 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/pojo/apiv2/models/RelatedResponse.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/models/pojo/apiv2/models/RelatedResponse.kt @@ -1,9 +1,19 @@ package io.github.feelfreelinux.wykopmobilny.models.pojo.apiv2.models +import com.squareup.moshi.Json + class RelatedResponse ( + @Json(name="id") val id : Int, + @Json(name="url") val url : String, + @Json(name="vote_count") val voteCount : Int, + @Json(name="author") val author : AuthorResponse, - val title : String + @Json(name="title") + val title : String, + + @Json(name="user_vote") + val userVote : Int? ) \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/RelatedListAdapter.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/RelatedListAdapter.kt index 7701db40b..041da146f 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/RelatedListAdapter.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/RelatedListAdapter.kt @@ -6,10 +6,11 @@ import android.view.ViewGroup import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.models.dataclass.Related import io.github.feelfreelinux.wykopmobilny.ui.adapters.viewholders.RelatedViewHolder +import io.github.feelfreelinux.wykopmobilny.ui.widgets.link.related.RelatedWidgetPresenterFactory import io.github.feelfreelinux.wykopmobilny.utils.usermanager.UserManagerApi import javax.inject.Inject -class RelatedListAdapter @Inject constructor(val userManagerApi: UserManagerApi) : RecyclerView.Adapter() { +class RelatedListAdapter @Inject constructor(val userManagerApi: UserManagerApi, val relatedWidgetPresenterFactory: RelatedWidgetPresenterFactory) : RecyclerView.Adapter() { val dataset = ArrayList() override fun onBindViewHolder(holder: RelatedViewHolder?, position: Int) { @@ -19,5 +20,5 @@ class RelatedListAdapter @Inject constructor(val userManagerApi: UserManagerApi) override fun getItemCount(): Int = dataset.size override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RelatedViewHolder = - RelatedViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.link_related_list_item, parent, false), userManagerApi) + RelatedViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.link_related_list_item, parent, false), userManagerApi, relatedWidgetPresenterFactory.create()) } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/viewholders/RelatedViewHolder.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/viewholders/RelatedViewHolder.kt index f9b655f3c..65e3e84b9 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/viewholders/RelatedViewHolder.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/adapters/viewholders/RelatedViewHolder.kt @@ -3,11 +3,12 @@ package io.github.feelfreelinux.wykopmobilny.ui.adapters.viewholders import android.support.v7.widget.RecyclerView import android.view.View import io.github.feelfreelinux.wykopmobilny.models.dataclass.Related +import io.github.feelfreelinux.wykopmobilny.ui.widgets.link.related.RelatedWidgetPresenter import io.github.feelfreelinux.wykopmobilny.utils.usermanager.UserManagerApi import kotlinx.android.synthetic.main.link_related_list_item.view.* -class RelatedViewHolder(val view: View, val userManagerApi: UserManagerApi) : RecyclerView.ViewHolder(view) { +class RelatedViewHolder(val view: View, val userManagerApi: UserManagerApi, val relatedWidgetPresenter: RelatedWidgetPresenter) : RecyclerView.ViewHolder(view) { fun bindView(related: Related) { - view.relatedView.setRelatedData(related, userManagerApi) + view.relatedView.setRelatedData(related, userManagerApi, relatedWidgetPresenter) } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragment.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragment.kt index deaa82eb9..0aadf818e 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragment.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragment.kt @@ -8,6 +8,7 @@ import android.view.ViewGroup import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.base.BaseActivity import io.github.feelfreelinux.wykopmobilny.base.BaseFragment +import io.github.feelfreelinux.wykopmobilny.ui.modules.search.SearchFragmentNotifier import kotlinx.android.synthetic.main.activity_mywykop.* class FavoriteFragment : BaseFragment() { @@ -36,4 +37,13 @@ class FavoriteFragment : BaseFragment() { (activity as BaseActivity).supportActionBar?.setTitle(R.string.favourite) } + + override fun onPause() { + super.onPause() + if (isRemoving) + for (i in 0 until pagerAdapter.registeredFragments.size()) { + (pagerAdapter.registeredFragments.valueAt(i) as FavoriteFragmentNotifier) + .removeDataFragment() + } + } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragmentNotifier.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragmentNotifier.kt new file mode 100644 index 000000000..e39eb6e2d --- /dev/null +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoriteFragmentNotifier.kt @@ -0,0 +1,5 @@ +package io.github.feelfreelinux.wykopmobilny.ui.modules.favorite + +interface FavoriteFragmentNotifier { + fun removeDataFragment() +} \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoritePagerAdapter.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoritePagerAdapter.kt index d13a14805..8f66c2ff2 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoritePagerAdapter.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/FavoritePagerAdapter.kt @@ -4,6 +4,8 @@ import android.content.res.Resources import android.support.v4.app.Fragment import android.support.v4.app.FragmentManager import android.support.v4.app.FragmentPagerAdapter +import android.util.SparseArray +import android.view.ViewGroup import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.ui.modules.favorite.entry.EntryFavoriteFragment import io.github.feelfreelinux.wykopmobilny.ui.modules.favorite.links.LinksFavoriteFragment @@ -12,13 +14,28 @@ import io.github.feelfreelinux.wykopmobilny.ui.modules.mywykop.tags.MyWykopTagsF import io.github.feelfreelinux.wykopmobilny.ui.modules.mywykop.users.MyWykopUsersFragment class FavoritePagerAdapter(val resources : Resources, fragmentManager: FragmentManager) : FragmentPagerAdapter(fragmentManager) { - override fun getItem(position: Int): Fragment = when(position) { - 0 -> LinksFavoriteFragment.newInstance() - else -> EntryFavoriteFragment.newInstance() + val registeredFragments = SparseArray() + + override fun getItem(position: Int): Fragment { + return when(position) { + 0 -> LinksFavoriteFragment.newInstance() + else -> EntryFavoriteFragment.newInstance() + } } override fun getCount() = 2 + override fun instantiateItem(container: ViewGroup, position: Int): Any { + val fragment = super.instantiateItem(container, position) as Fragment + registeredFragments.put(position, fragment) + return fragment + } + + override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { + registeredFragments.removeAt(position) + super.destroyItem(container, position, `object`) + } + override fun getPageTitle(position: Int): CharSequence { super.getPageTitle(position) return when(position) { diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/entry/EntryFavoriteFragment.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/entry/EntryFavoriteFragment.kt index 21e9af42e..256c7f52e 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/entry/EntryFavoriteFragment.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/entry/EntryFavoriteFragment.kt @@ -8,9 +8,11 @@ import io.github.feelfreelinux.wykopmobilny.models.fragments.PagedDataModel import io.github.feelfreelinux.wykopmobilny.models.fragments.getDataFragmentInstance import io.github.feelfreelinux.wykopmobilny.models.fragments.removeDataFragment import io.github.feelfreelinux.wykopmobilny.ui.adapters.FeedAdapter +import io.github.feelfreelinux.wykopmobilny.ui.modules.favorite.FavoriteFragmentNotifier +import io.github.feelfreelinux.wykopmobilny.utils.printout import javax.inject.Inject -class EntryFavoriteFragment : BaseFeedFragment(), EntryFavoriteView { +class EntryFavoriteFragment : BaseFeedFragment(), EntryFavoriteView, FavoriteFragmentNotifier { @Inject override lateinit var feedAdapter : FeedAdapter @Inject lateinit var presenter : EntryFavoritePresenter lateinit var dataFragment : DataFragment>> @@ -48,8 +50,7 @@ class EntryFavoriteFragment : BaseFeedFragment(), EntryFavoriteView { presenter.unsubscribe() } - override fun onPause() { - super.onPause() - if (isRemoving) supportFragmentManager.removeDataFragment(dataFragment) + override fun removeDataFragment() { + supportFragmentManager?.removeDataFragment(dataFragment) } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/links/LinksFavoriteFragment.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/links/LinksFavoriteFragment.kt index f1bb7a805..4512961de 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/links/LinksFavoriteFragment.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/favorite/links/LinksFavoriteFragment.kt @@ -9,9 +9,11 @@ import io.github.feelfreelinux.wykopmobilny.models.fragments.PagedDataModel import io.github.feelfreelinux.wykopmobilny.models.fragments.getDataFragmentInstance import io.github.feelfreelinux.wykopmobilny.models.fragments.removeDataFragment import io.github.feelfreelinux.wykopmobilny.ui.adapters.LinkAdapter +import io.github.feelfreelinux.wykopmobilny.ui.modules.favorite.FavoriteFragmentNotifier +import io.github.feelfreelinux.wykopmobilny.utils.printout import javax.inject.Inject -class LinksFavoriteFragment : BaseFeedFragment(), LinksFavoriteView { +class LinksFavoriteFragment : BaseFeedFragment(), LinksFavoriteView, FavoriteFragmentNotifier { @Inject override lateinit var feedAdapter : LinkAdapter @Inject lateinit var presenter : LinksFavoritePresenter lateinit var dataFragment : DataFragment>> @@ -49,8 +51,7 @@ class LinksFavoriteFragment : BaseFeedFragment(), LinksFavoriteView { presenter.unsubscribe() } - override fun onPause() { - super.onPause() - if (isRemoving) supportFragmentManager.removeDataFragment(dataFragment) + override fun removeDataFragment() { + supportFragmentManager?.removeDataFragment(dataFragment) } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivity.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivity.kt index fb7dc2c9a..fc44c1210 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivity.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/linkdetails/LinkDetailsActivity.kt @@ -72,7 +72,7 @@ class LinkDetailsActivity : BaseActivity(), LinkDetailsView, SwipeRefreshLayout. @Inject lateinit var suggestionsApi : SuggestApi @Inject lateinit var clipboardHelper : ClipboardHelperApi @Inject lateinit var presenter: LinkDetailsPresenter - private lateinit var linkFragmentData: DataFragment + private lateinit var linkFragmentData: DataFragment> // link, sortby @Inject lateinit var adapter : LinkDetailsAdapter override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -111,7 +111,8 @@ class LinkDetailsActivity : BaseActivity(), LinkDetailsView, SwipeRefreshLayout. swiperefresh.setOnRefreshListener(this) linkFragmentData = supportFragmentManager.getDataFragmentInstance(EXTRA_FRAGMENT_KEY + linkId) if (linkFragmentData.data != null) { - adapter.link = linkFragmentData.data + adapter.link = linkFragmentData.data?.first + presenter.sortBy = linkFragmentData.data?.second ?: "best" adapter.notifyDataSetChanged() loadingView.isVisible = false } else { @@ -122,11 +123,7 @@ class LinkDetailsActivity : BaseActivity(), LinkDetailsView, SwipeRefreshLayout. presenter.updateLink() } - when(presenter.sortBy) { - "new" -> supportActionBar?.setSubtitle(R.string.sortby_newest) - "old" -> supportActionBar?.setSubtitle(R.string.sortby_oldest) - "best" -> supportActionBar?.setSubtitle(R.string.sortby_best) - } + setSubtitle() } override fun onCreateOptionsMenu(menu: Menu?): Boolean { @@ -134,25 +131,33 @@ class LinkDetailsActivity : BaseActivity(), LinkDetailsView, SwipeRefreshLayout. return true } + fun setSubtitle() { + supportActionBar?.setSubtitle(when(presenter.sortBy) { + "new" -> R.string.sortby_newest + "old" -> R.string.sortby_oldest + else -> R.string.sortby_best + }) + } + override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.refresh -> onRefresh() R.id.sortbyBest -> { presenter.sortBy = "best" - supportActionBar?.setSubtitle(R.string.sortby_best) + setSubtitle() presenter.loadComments() swiperefresh.isRefreshing = true } R.id.sortbyNewest -> { presenter.sortBy = "new" - supportActionBar?.setSubtitle(R.string.sortby_newest) + setSubtitle() presenter.loadComments() swiperefresh.isRefreshing = true } R.id.sortbyOldest -> { presenter.sortBy = "old" - supportActionBar?.setSubtitle(R.string.sortby_oldest) + setSubtitle() presenter.loadComments() swiperefresh.isRefreshing = true } @@ -169,7 +174,7 @@ class LinkDetailsActivity : BaseActivity(), LinkDetailsView, SwipeRefreshLayout. override fun onSaveInstanceState(outState: Bundle) { outState.putString(EXTRA_SORTBY, presenter.sortBy) super.onSaveInstanceState(outState) - linkFragmentData.data = adapter.link + adapter.link?.let { linkFragmentData.data = Pair(adapter.link!!, presenter.sortBy) } } override fun onPause() { diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/upcoming/UpcomingFragment.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/upcoming/UpcomingFragment.kt index 47b51a118..b1b5984a6 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/upcoming/UpcomingFragment.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/links/upcoming/UpcomingFragment.kt @@ -7,10 +7,7 @@ import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.base.BaseActivity import io.github.feelfreelinux.wykopmobilny.base.BaseFeedFragment import io.github.feelfreelinux.wykopmobilny.models.dataclass.Link -import io.github.feelfreelinux.wykopmobilny.models.fragments.DataFragment -import io.github.feelfreelinux.wykopmobilny.models.fragments.PagedDataModel -import io.github.feelfreelinux.wykopmobilny.models.fragments.getDataFragmentInstance -import io.github.feelfreelinux.wykopmobilny.models.fragments.removeDataFragment +import io.github.feelfreelinux.wykopmobilny.models.fragments.* import io.github.feelfreelinux.wykopmobilny.ui.adapters.LinkAdapter import io.github.feelfreelinux.wykopmobilny.ui.modules.mainnavigation.MainNavigationInterface import javax.inject.Inject @@ -19,7 +16,7 @@ class UpcomingFragment : BaseFeedFragment(), UpcomingView { @Inject override lateinit var feedAdapter : LinkAdapter @Inject lateinit var presenter : UpcomingPresenter val navigation by lazy { activity as MainNavigationInterface } - lateinit var dataFragment : DataFragment>> + lateinit var dataFragment : DataFragment>> companion object { val DATA_FRAGMENT_TAG = "UPCOMING_FRAGMENT_TAG" @@ -32,7 +29,6 @@ class UpcomingFragment : BaseFeedFragment(), UpcomingView { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { setHasOptionsMenu(true) navigation.activityToolbar.overflowIcon = ContextCompat.getDrawable(activity!!, R.drawable.ic_sort) - navigation.activityToolbar.subtitle = getString(R.string.upcoming_sortby_comments) return super.onCreateView(inflater, container, savedInstanceState) } @@ -49,22 +45,26 @@ class UpcomingFragment : BaseFeedFragment(), UpcomingView { } R.id.sortByComments -> { presenter.sortBy = UpcomingPresenter.SORTBY_COMMENTS - navigation.activityToolbar.setSubtitle(R.string.upcoming_sortby_comments) + setSubtitle() + isRefreshing = true onRefresh() } R.id.sortByVotes -> { presenter.sortBy = UpcomingPresenter.SORTBY_VOTES - navigation.activityToolbar.setSubtitle(R.string.upcoming_sortby_votes) + setSubtitle() + isRefreshing = true onRefresh() } R.id.sortByDate -> { presenter.sortBy = UpcomingPresenter.SORTBY_DATE - navigation.activityToolbar.setSubtitle(R.string.upcoming_sortby_date) + setSubtitle() + isRefreshing = true onRefresh() } R.id.sortByActive -> { presenter.sortBy = UpcomingPresenter.SORTBY_ACTIVE - navigation.activityToolbar.setSubtitle(R.string.upcoming_sortby_active) + setSubtitle() + isRefreshing = true onRefresh() } } @@ -77,19 +77,30 @@ class UpcomingFragment : BaseFeedFragment(), UpcomingView { dataFragment = supportFragmentManager.getDataFragmentInstance(DATA_FRAGMENT_TAG) dataFragment.data?.apply { presenter.page = page + presenter.sortBy = sortby } (activity as BaseActivity).supportActionBar?.setTitle(R.string.wykopalisko) presenter.subscribe(this) + setSubtitle() initAdapter(dataFragment.data?.model) } + fun setSubtitle() { + navigation.activityToolbar.setSubtitle(when (presenter.sortBy) { + UpcomingPresenter.SORTBY_ACTIVE -> R.string.upcoming_sortby_active + UpcomingPresenter.SORTBY_DATE -> R.string.upcoming_sortby_date + UpcomingPresenter.SORTBY_VOTES -> R.string.upcoming_sortby_votes + else -> R.string.upcoming_sortby_comments + }) + } + override fun loadData(shouldRefresh: Boolean) { presenter.getUpcomingLinks(shouldRefresh) } override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) - dataFragment.data = PagedDataModel(presenter.page , data) + dataFragment.data = SortedPagedDataModel(presenter.page, presenter.sortBy, data) } override fun onDetach() { diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt index ebccae0cd..893f3cfaa 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt @@ -4,6 +4,8 @@ import android.content.Context import android.content.Intent import android.content.res.Configuration import android.os.Bundle +import android.support.design.widget.BottomSheetBehavior +import android.support.design.widget.BottomSheetDialog import android.support.design.widget.NavigationView import android.support.v4.app.Fragment import android.support.v4.view.GravityCompat @@ -36,9 +38,11 @@ import io.github.feelfreelinux.wykopmobilny.ui.modules.search.SearchFragment import io.github.feelfreelinux.wykopmobilny.ui.modules.settings.SettingsActivity import io.github.feelfreelinux.wykopmobilny.utils.SettingsPreferencesApi import io.github.feelfreelinux.wykopmobilny.utils.isVisible +import io.github.feelfreelinux.wykopmobilny.utils.openBrowser import io.github.feelfreelinux.wykopmobilny.utils.printout import io.github.feelfreelinux.wykopmobilny.utils.usermanager.UserManagerApi import kotlinx.android.synthetic.main.activity_navigation.* +import kotlinx.android.synthetic.main.app_about_bottomsheet.view.* import kotlinx.android.synthetic.main.drawer_header_view_layout.view.* import kotlinx.android.synthetic.main.navigation_header.view.* import kotlinx.android.synthetic.main.toolbar.* @@ -74,14 +78,15 @@ class MainNavigationActivity : BaseActivity(), MainNavigationView, NavigationVie override fun onNavigationItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.nav_mikroblog -> openFragment(HotFragment.newInstance()) - R.id.login -> { navigator.openLoginScreen(this, LOGIN_REQUEST_CODE) } + R.id.login -> { navigator.openLoginScreen(LOGIN_REQUEST_CODE) } R.id.messages -> { openFragment(ConversationsListFragment.newInstance()) } - R.id.nav_settings -> { navigator.openSettingsActivity(this) } + R.id.nav_settings -> { navigator.openSettingsActivity() } R.id.nav_mojwykop -> { openFragment(MyWykopFragment.newInstance()) } R.id.nav_home -> { openFragment(PromotedFragment.newInstance()) } R.id.search -> { openFragment(SearchFragment.newInstance()) } R.id.favourite -> { openFragment(FavoriteFragment.newInstance()) } R.id.nav_wykopalisko -> { openFragment(UpcomingFragment.newInstance()) } + R.id.about -> { openAboutSheet() } R.id.logout -> { userManagerApi.logoutUser() restartActivity() @@ -96,8 +101,7 @@ class MainNavigationActivity : BaseActivity(), MainNavigationView, NavigationVie @Inject lateinit var presenter : MainNavigationPresenter @Inject lateinit var settingsApi : SettingsPreferencesApi - @Inject lateinit var navigator : NavigatorApi - @Inject lateinit var newNavigator : NewNavigatorApi + @Inject lateinit var navigator : NewNavigatorApi @Inject lateinit var userManagerApi : UserManagerApi @@ -255,7 +259,7 @@ class MainNavigationActivity : BaseActivity(), MainNavigationView, NavigationVie } override fun restartActivity() { - navigator.openMainActivity(this) + navigator.openMainActivity() finish() } @@ -287,4 +291,40 @@ class MainNavigationActivity : BaseActivity(), MainNavigationView, NavigationVie } } } + + fun openAboutSheet() { + val dialog = BottomSheetDialog(this) + val bottomSheetView = layoutInflater.inflate(R.layout.app_about_bottomsheet, null) + dialog.setContentView(bottomSheetView) + + bottomSheetView.apply { + val versionName = packageManager.getPackageInfo(packageName, 0).versionName + app_version_textview.text = getString(R.string.app_version, versionName) + app_version.setOnClickListener { + openBrowser("https://github.com/feelfreelinux/WykopMobilny") + dialog.dismiss() + } + + app_report_bug.setOnClickListener { + navigator.openTagActivity("owmbugi") + dialog.dismiss() + } + + app_observe_tag.setOnClickListener { + navigator.openTagActivity("otwartywykopmobilny") + dialog.dismiss() + } + + license.setOnClickListener { + openBrowser("https://github.com/feelfreelinux/WykopMobilny/blob/master/LICENSE") + dialog.dismiss() + } + } + + val mBehavior = BottomSheetBehavior.from(bottomSheetView.parent as View) + dialog.setOnShowListener { + mBehavior.peekHeight = bottomSheetView.height + } + dialog.show() + } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/search/SearchPagerAdapter.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/search/SearchPagerAdapter.kt index be5171b05..e7989b72a 100755 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/search/SearchPagerAdapter.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/search/SearchPagerAdapter.kt @@ -43,6 +43,4 @@ class SearchPagerAdapter(val resources : Resources, fragmentManager: FragmentMan else -> resources.getString(R.string.profiles) } } - - } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/LinkWidget.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/LinkWidget.kt index df252b86b..25ced2522 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/LinkWidget.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/LinkWidget.kt @@ -99,6 +99,10 @@ class LinkWidget(context: Context, attrs: AttributeSet) : CardView(context, attr link.preview?.let { image.loadImage(link.preview!!.stripImageCompression()) } description.text = link.description.removeHtml() relatedCountTextView.text = link.relatedCount.toString() + relatedCountTextView.setOnClickListener { + if (link.relatedCount > 0) + presenter.openRelatedList() + } setOnClickListener { presenter.navigatorApi.openBrowser(link.sourceUrl) } @@ -184,6 +188,7 @@ class LinkWidget(context: Context, attrs: AttributeSet) : CardView(context, attr } link_related.setOnClickListener { + if (link.relatedCount > 0) presenter.openRelatedList() dialog.dismiss() } diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/comment/LinkCommentWidget.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/comment/LinkCommentWidget.kt index 21866b02c..f7e2bb649 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/comment/LinkCommentWidget.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/comment/LinkCommentWidget.kt @@ -65,6 +65,7 @@ class LinkCommentWidget(context: Context, attrs: AttributeSet) : CardView(contex comment.body?.let { commentContentTextView.prepareBody(comment.body!!, this) } + commentContentTextView.isVisible = !comment.body.isNullOrEmpty() val margin = if (comment.id != comment.parentId) 8f else 0f val px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, margin, resources.displayMetrics) val params = layoutParams as MarginLayoutParams diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidget.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidget.kt index 221377dc9..2a6881fb8 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidget.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidget.kt @@ -7,13 +7,14 @@ import android.util.TypedValue import android.view.View import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.models.dataclass.Related +import io.github.feelfreelinux.wykopmobilny.ui.dialogs.showExceptionDialog import io.github.feelfreelinux.wykopmobilny.utils.api.getGroupColor import io.github.feelfreelinux.wykopmobilny.utils.getActivityContext import io.github.feelfreelinux.wykopmobilny.utils.openBrowser import io.github.feelfreelinux.wykopmobilny.utils.usermanager.UserManagerApi import kotlinx.android.synthetic.main.link_related_layout.view.* -class RelatedWidget(context: Context, attrs: AttributeSet) : CardView(context, attrs) { +class RelatedWidget(context: Context, attrs: AttributeSet) : CardView(context, attrs), RelatedWidgetView { init { View.inflate(context, R.layout.link_related_layout, this) isClickable = true @@ -23,18 +24,88 @@ class RelatedWidget(context: Context, attrs: AttributeSet) : CardView(context, a setBackgroundResource(typedValue.resourceId) } + lateinit var presenter : RelatedWidgetPresenter + lateinit var relatedItem : Related - fun setRelatedData(related : Related, userManagerApi: UserManagerApi) { + fun setRelatedData(related : Related, userManagerApi: UserManagerApi, relatedWidgetPresenter: RelatedWidgetPresenter) { relatedItem = related + presenter = relatedWidgetPresenter title.text = related.title urlTextView.text = related.url userNameTextView.text = related.author.nick userNameTextView.setTextColor(context.getGroupColor(related.author.group)) + presenter.subscribe(this) + presenter.relatedId = relatedItem.id + title.setOnClickListener { + context.openBrowser(related.url) + } + userNameTextView.setOnClickListener { + context.openBrowser(related.url) + } setOnClickListener { context.openBrowser(related.url) } - voteCountTextView.text = if (related.voteCount > 0) "+${related.voteCount}" else "${related.voteCount}" + setVoteCount(related.voteCount) authorHeaderView.setAuthor(related.author) + setupButtons() + plusButton.setup(userManagerApi) + minusButton.setup(userManagerApi) + } + + fun setupButtons() { + when (relatedItem.userVote) { + 1 -> { + plusButton.isButtonSelected = true + plusButton.isEnabled = false + minusButton.isButtonSelected = false + minusButton.isEnabled = true + minusButton.voteListener = { + presenter.voteDown() + } + } + + 0 -> { + plusButton.isButtonSelected = false + plusButton.isEnabled = true + plusButton.voteListener = { + presenter.voteUp() + } + minusButton.isButtonSelected = false + minusButton.isEnabled = true + minusButton.voteListener = { + presenter.voteDown() + } + } + + -1 -> { + minusButton.isButtonSelected = true + minusButton.isEnabled = false + plusButton.isButtonSelected = false + plusButton.isEnabled = true + plusButton.voteListener = { + presenter.voteUp() + } + } + } + } + + override fun markUnvoted() { + relatedItem.userVote = -1 + setupButtons() + } + + override fun markVoted() { + relatedItem.userVote = 1 + setupButtons() + } + + override fun setVoteCount(voteCount: Int) { + relatedItem.voteCount = voteCount + voteCountTextView.text = if (relatedItem.voteCount > 0) "+${relatedItem.voteCount}" else "${relatedItem.voteCount}" + } + + override fun showErrorDialog(e: Throwable) { + context.showExceptionDialog(e) } } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenter.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenter.kt index edb828549..7bd2624cd 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenter.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenter.kt @@ -1,2 +1,30 @@ package io.github.feelfreelinux.wykopmobilny.ui.widgets.link.related +import io.github.feelfreelinux.wykopmobilny.api.links.LinksApi +import io.github.feelfreelinux.wykopmobilny.base.BasePresenter +import io.github.feelfreelinux.wykopmobilny.base.Schedulers + +class RelatedWidgetPresenter(val schedulers: Schedulers, val linksApi: LinksApi) : BasePresenter() { + var relatedId = -1 + fun voteUp() { + compositeObservable.add( + linksApi.relatedVoteUp(relatedId) + .subscribeOn(schedulers.backgroundThread()) + .observeOn(schedulers.mainThread()) + .subscribe({ + view?.setVoteCount(it.voteCount) + view?.markVoted() }, { view?.showErrorDialog(it) }) + ) + } + + fun voteDown() { + compositeObservable.add( + linksApi.relatedVoteDown(relatedId) + .subscribeOn(schedulers.backgroundThread()) + .observeOn(schedulers.mainThread()) + .subscribe({ + view?.setVoteCount(it.voteCount) + view?.markUnvoted() }, { view?.showErrorDialog(it) }) + ) + } +} \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenterFactory.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenterFactory.kt new file mode 100644 index 000000000..445c76f7f --- /dev/null +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetPresenterFactory.kt @@ -0,0 +1,11 @@ +package io.github.feelfreelinux.wykopmobilny.ui.widgets.link.related + +import io.github.feelfreelinux.wykopmobilny.api.links.LinksApi +import io.github.feelfreelinux.wykopmobilny.base.Schedulers +import javax.inject.Inject + +class RelatedWidgetPresenterFactory @Inject constructor(val schedulers: Schedulers, val linksApi: LinksApi) { + fun create() : RelatedWidgetPresenter { + return RelatedWidgetPresenter(schedulers, linksApi) + } +} \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetView.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetView.kt index b4732df65..39c275cab 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetView.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/widgets/link/related/RelatedWidgetView.kt @@ -2,4 +2,8 @@ package io.github.feelfreelinux.wykopmobilny.ui.widgets.link.related import io.github.feelfreelinux.wykopmobilny.base.BaseView -interface RelatedWidgetView : BaseView \ No newline at end of file +interface RelatedWidgetView : BaseView { + fun markVoted() + fun markUnvoted() + fun setVoteCount(voteCount : Int) +} \ No newline at end of file diff --git a/app/src/main/res/layout/app_about_bottomsheet.xml b/app/src/main/res/layout/app_about_bottomsheet.xml new file mode 100755 index 000000000..f3acaaa07 --- /dev/null +++ b/app/src/main/res/layout/app_about_bottomsheet.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_voters.xml b/app/src/main/res/layout/dialog_voters.xml index 3bce6a4dc..6c13a5f9d 100755 --- a/app/src/main/res/layout/dialog_voters.xml +++ b/app/src/main/res/layout/dialog_voters.xml @@ -29,7 +29,7 @@ android:paddingTop="@dimen/dialog_voters_padding_vertical" android:paddingBottom="@dimen/dialog_voters_padding_vertical"/> - @@ -43,6 +43,6 @@ android:paddingTop="@dimen/dialog_voters_padding_vertical" android:paddingBottom="@dimen/dialog_voters_padding_vertical"/> - + \ No newline at end of file diff --git a/app/src/main/res/layout/link_related_layout.xml b/app/src/main/res/layout/link_related_layout.xml index faeb38862..8ee019de4 100755 --- a/app/src/main/res/layout/link_related_layout.xml +++ b/app/src/main/res/layout/link_related_layout.xml @@ -9,8 +9,7 @@ + android:layout_height="wrap_content"> + app:layout_constraintTop_toBottomOf="@id/lineBottom" + android:clickable="true" + android:focusable="true"> + app:layout_constraintBottom_toBottomOf="parent" + android:focusable="true" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c03bd7b15..267d27eea 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,5 +125,9 @@ Treść nieodpowiednia Nie nadaje się Oznacz jako 18+ + Aplikacja została upubliczniona na licencji MIT + Zgłoś błąd pod tagiem #owmbugi + Obserwuj tag #otwartywykopmobilny + Wykop Mobilny (%1$s)