forked from Ivasoft/mattermost-mobile
* iOS clear notifications from a specific channel when clear push notification received * Android leave notifications until channel is read * use redux-connect currentChannelId in network indicator
40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.mattermost.rnbeta;
|
|
|
|
import android.content.Context;
|
|
|
|
import com.wix.reactnativenotifications.core.AppLaunchHelper;
|
|
import com.wix.reactnativenotifications.core.notificationdrawer.PushNotificationsDrawer;
|
|
import com.wix.reactnativenotifications.core.notificationdrawer.IPushNotificationsDrawer;
|
|
import com.wix.reactnativenotifications.core.notificationdrawer.INotificationsDrawerApplication;
|
|
import com.wix.reactnativenotifications.helpers.PushNotificationHelper;
|
|
import static com.wix.reactnativenotifications.Defs.LOGTAG;
|
|
|
|
public class CustomPushNotificationDrawer extends PushNotificationsDrawer {
|
|
final protected Context mContext;
|
|
final protected AppLaunchHelper mAppLaunchHelper;
|
|
|
|
protected CustomPushNotificationDrawer(Context context, AppLaunchHelper appLaunchHelper) {
|
|
super(context, appLaunchHelper);
|
|
mContext = context;
|
|
mAppLaunchHelper = appLaunchHelper;
|
|
}
|
|
|
|
@Override
|
|
public void onAppInit() {
|
|
}
|
|
|
|
@Override
|
|
public void onAppVisible() {
|
|
}
|
|
|
|
@Override
|
|
public void onNotificationOpened() {
|
|
}
|
|
|
|
@Override
|
|
public void onCancelAllLocalNotifications() {
|
|
CustomPushNotification.clearAllNotifications(mContext);
|
|
cancelAllScheduledNotifications();
|
|
}
|
|
}
|