From 5943c051f562476d03bcc2d56488683393e65efd Mon Sep 17 00:00:00 2001 From: Vavassor Date: Sun, 30 Apr 2017 02:30:45 -0400 Subject: [PATCH] Adds forgotten and required interface to FavouritesActivity (SFragment.OnUserRemovedListener). Closes #245 --- .../com/keylesspalace/tusky/FavouritesActivity.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java index 4194f860..f45ab2c6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/FavouritesActivity.java @@ -23,7 +23,9 @@ import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; import android.view.MenuItem; -public class FavouritesActivity extends BaseActivity { +public class FavouritesActivity extends BaseActivity implements SFragment.OnUserRemovedListener { + private StatusRemoveListener statusRemoveListener; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -42,6 +44,8 @@ public class FavouritesActivity extends BaseActivity { Fragment fragment = TimelineFragment.newInstance(TimelineFragment.Kind.FAVOURITES); fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.commit(); + + statusRemoveListener = (StatusRemoveListener) fragment; } @Override @@ -54,4 +58,9 @@ public class FavouritesActivity extends BaseActivity { } return super.onOptionsItemSelected(item); } + + @Override + public void onUserRemoved(String accountId) { + statusRemoveListener.removePostsByUser(accountId); + } }