char content[512];
int unread_msg_cnt = get_number_of_unread_messages();
+
+ if (unread_msg_cnt <= 0) {
+ return result;
+ }
+
sprintf(content, "%d new messages received.", unread_msg_cnt);
char *sound_track = NULL;
hide_loading_popup(ad);
launch_user_main_view_cb(ad);
int unread_msg_cnt = get_number_of_unread_messages();
+ if (unread_msg_cnt <= 0) {
+ return ECORE_CALLBACK_CANCEL;
+ }
+
int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
if (BADGE_ERROR_NONE != err) {
if (app_data) {
app_data->s_app_visible_state = APP_STATE_IN_BACKGROUND;
int unread_msg_cnt = get_number_of_unread_messages();
+ if (unread_msg_cnt <= 0) {
+ return;
+ }
int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
if (BADGE_ERROR_NONE != err) {
}
int unread_msg_cnt = get_number_of_unread_messages();
- int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
- if (BADGE_ERROR_NONE != err) {
+ if (unread_msg_cnt > 0) {
+ int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
+ if (BADGE_ERROR_NONE != err) {
+ }
}
-
if (app_data->panel) {
Evas_Object *panel_list = evas_object_data_get(app_data->panel, "panel_list");
if (panel_list) {
char *app_id = TELEGRAM_APP_ID;
tg_notification_create(tg_data, icon_path, title, content, sound_track, app_id);
- int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
- if (BADGE_ERROR_NONE != err) {
+ if (unread_msg_cnt > 0) {
+ int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
+ if (BADGE_ERROR_NONE != err) {
+ }
}
}
bundle_free(msg);
char *app_id = TELEGRAM_APP_ID;
tg_notification_create(tg_data, icon_path, title, content, sound_track, app_id);
- int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
- if (BADGE_ERROR_NONE != err) {
+ if (unread_msg_cnt > 0) {
+ int err = badge_set_count(TELEGRAM_APP_ID, unread_msg_cnt);
+ if (BADGE_ERROR_NONE != err) {
+ }
}
}
bundle_free(msg);