Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit d151494

Browse files
Sam1301kunall17
authored andcommitted
Dismiss notifications after upload.
1 parent 0e4e69f commit d151494

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/com/zulip/android/activities/ZulipActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,20 +1218,23 @@ public void onSuccess(Call<UploadResponse> call, Response<UploadResponse> respon
12181218
} else {
12191219
endNotification(notifId, getString(R.string.failed_to_upload));
12201220
}
1221+
mNotificationManager.cancel(notifId);
12211222
}
12221223
}
12231224

12241225
@Override
12251226
public void onError(Call<UploadResponse> call, Response<UploadResponse> response) {
12261227
if (!isDestroyed()) {
12271228
endNotification(notifId, getString(R.string.failed_to_upload));
1229+
mNotificationManager.cancel(notifId);
12281230
}
12291231
}
12301232

12311233
@Override
12321234
public void onFailure(Call<UploadResponse> call, Throwable t) {
12331235
if (!isDestroyed()) {
12341236
endNotification(notifId, getString(R.string.failed_to_upload));
1237+
mNotificationManager.cancel(notifId);
12351238
ZLog.logException(t);
12361239
}
12371240
}

0 commit comments

Comments
 (0)