mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Removed redundent class
This commit is contained in:
parent
41b41f7021
commit
fb0526f54f
5 changed files with 1 additions and 22 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
package fr.free.nrw.commons;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base interface for all the views
|
|
||||||
*/
|
|
||||||
public interface MvpView {
|
|
||||||
void showMessage(String message);
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
package fr.free.nrw.commons.campaigns
|
package fr.free.nrw.commons.campaigns
|
||||||
|
|
||||||
import fr.free.nrw.commons.MvpView
|
|
||||||
import fr.free.nrw.commons.campaigns.models.Campaign
|
import fr.free.nrw.commons.campaigns.models.Campaign
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface which defines the view contracts of the campaign view
|
* Interface which defines the view contracts of the campaign view
|
||||||
*/
|
*/
|
||||||
interface ICampaignsView : MvpView {
|
interface ICampaignsView {
|
||||||
fun showCampaigns(campaign: Campaign?)
|
fun showCampaigns(campaign: Campaign?)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import fr.free.nrw.commons.BasePresenter
|
||||||
interface ContributionsContract {
|
interface ContributionsContract {
|
||||||
|
|
||||||
interface View {
|
interface View {
|
||||||
fun showMessage(localizedMessage: String)
|
|
||||||
fun getContext(): Context?
|
fun getContext(): Context?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -743,10 +743,6 @@ class ContributionsFragment : CommonsDaggerSupportFragment(), FragmentManager.On
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showMessage(message: String) {
|
|
||||||
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun showCampaigns(campaign: Campaign?) {
|
override fun showCampaigns(campaign: Campaign?) {
|
||||||
if (campaign != null && !isUserProfile) {
|
if (campaign != null && !isUserProfile) {
|
||||||
if (binding != null) {
|
if (binding != null) {
|
||||||
|
|
|
||||||
|
|
@ -248,13 +248,6 @@ class ContributionsFragmentUnitTests {
|
||||||
fragment.onDestroyView()
|
fragment.onDestroyView()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@Throws(Exception::class)
|
|
||||||
fun testShowMessage() {
|
|
||||||
Shadows.shadowOf(Looper.getMainLooper()).idle()
|
|
||||||
fragment.showMessage("")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Throws(Exception::class)
|
@Throws(Exception::class)
|
||||||
fun testShowCampaigns() {
|
fun testShowCampaigns() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue