DC download: fix 'no new dives' message

Stupidly, commit 731d9dc9bd ("DC download: tell user when no new dives
were found") was missing the conditional when to show that messages.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-09-20 18:44:10 -04:00
parent 9dd8726d12
commit 16d9b0c790

View file

@ -1121,7 +1121,8 @@ const char *do_libdivecomputer_import(device_data_t *data)
/* TODO: Show the logfile to the user on error. */
dc_device_close(data->device);
data->device = NULL;
dev_info(data, translate("gettextFromC", "No new dives downloaded from dive computer"));
if (!downloadTable.nr)
dev_info(data, translate("gettextFromC", "No new dives downloaded from dive computer"));
}
dc_context_free(data->context);