Suggested changes for notification fixes

This commit is contained in:
maskara 2018-03-10 22:44:37 +05:30
parent 21a6b1f00c
commit e5c8e40b76
2 changed files with 3 additions and 7 deletions

View file

@ -102,12 +102,6 @@ dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
repositories {
mavenCentral()
google()
}
android {
compileSdkVersion project.compileSdkVersion
buildToolsVersion project.buildToolsVersion

View file

@ -46,6 +46,7 @@ import io.reactivex.Observable;
import io.reactivex.Single;
import timber.log.Timber;
import static fr.free.nrw.commons.notification.NotificationType.THANK_YOU_EDIT;
import static fr.free.nrw.commons.notification.NotificationType.UNKNOWN;
import static fr.free.nrw.commons.notification.NotificationUtils.getNotificationFromApiResult;
import static fr.free.nrw.commons.notification.NotificationUtils.getNotificationType;
@ -453,7 +454,8 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
for (int i = 0; i < childNodes.getLength(); i++) {
Node node = childNodes.item(i);
if (isCommonsNotification(node)
&& !getNotificationType(node).equals(UNKNOWN)) {
&& !getNotificationType(node).equals(UNKNOWN)
&& !getNotificationType(node).equals(THANK_YOU_EDIT)) {
notifications.add(getNotificationFromApiResult(context, node));
}
}