Search in sources :

Example 1 with StatusRemoveListener

use of com.keylesspalace.tusky.interfaces.StatusRemoveListener in project Tusky by Vavassor.

the class AccountActivity method onUserRemoved.

@Override
public void onUserRemoved(String accountId) {
    for (Fragment fragment : pagerAdapter.getRegisteredFragments()) {
        if (fragment instanceof StatusRemoveListener) {
            StatusRemoveListener listener = (StatusRemoveListener) fragment;
            listener.removePostsByUser(accountId);
        }
    }
}
Also used : StatusRemoveListener(com.keylesspalace.tusky.interfaces.StatusRemoveListener) Fragment(android.support.v4.app.Fragment) SFragment(com.keylesspalace.tusky.fragment.SFragment)

Example 2 with StatusRemoveListener

use of com.keylesspalace.tusky.interfaces.StatusRemoveListener in project Tusky by Vavassor.

the class ViewThreadActivity method onUserRemoved.

@Override
public void onUserRemoved(String accountId) {
    if (viewThreadFragment instanceof StatusRemoveListener) {
        StatusRemoveListener listener = (StatusRemoveListener) viewThreadFragment;
        listener.removePostsByUser(accountId);
    }
}
Also used : StatusRemoveListener(com.keylesspalace.tusky.interfaces.StatusRemoveListener)

Example 3 with StatusRemoveListener

use of com.keylesspalace.tusky.interfaces.StatusRemoveListener in project Tusky by Vavassor.

the class MainActivity method onUserRemoved.

@Override
public void onUserRemoved(String accountId) {
    TimelinePagerAdapter adapter = (TimelinePagerAdapter) viewPager.getAdapter();
    for (Fragment fragment : adapter.getRegisteredFragments()) {
        if (fragment instanceof StatusRemoveListener) {
            StatusRemoveListener listener = (StatusRemoveListener) fragment;
            listener.removePostsByUser(accountId);
        }
    }
}
Also used : TimelinePagerAdapter(com.keylesspalace.tusky.pager.TimelinePagerAdapter) StatusRemoveListener(com.keylesspalace.tusky.interfaces.StatusRemoveListener) Fragment(android.support.v4.app.Fragment) SFragment(com.keylesspalace.tusky.fragment.SFragment)

Example 4 with StatusRemoveListener

use of com.keylesspalace.tusky.interfaces.StatusRemoveListener in project Tusky by Vavassor.

the class ViewTagActivity method onUserRemoved.

@Override
public void onUserRemoved(String accountId) {
    StatusRemoveListener listener = (StatusRemoveListener) timelineFragment;
    listener.removePostsByUser(accountId);
}
Also used : StatusRemoveListener(com.keylesspalace.tusky.interfaces.StatusRemoveListener)

Aggregations

StatusRemoveListener (com.keylesspalace.tusky.interfaces.StatusRemoveListener)4 Fragment (android.support.v4.app.Fragment)2 SFragment (com.keylesspalace.tusky.fragment.SFragment)2 TimelinePagerAdapter (com.keylesspalace.tusky.pager.TimelinePagerAdapter)1