Changeset b59778a in subsurface


Ignore:
Timestamp:
Dec 17, 2017, 9:04:16 AM (5 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
bd66ab1
Parents:
a748e7f
git-author:
Jan Mulder <jlmulder@…> (12/17/17 00:02:48)
git-committer:
Dirk Hohndel <dirk@…> (12/17/17 09:04:16)
Message:

mobile: use short date format in edit mode

See issue #949. In the dive list, dates are shown in short format, and
when we start to edit an existing dive, the date field on the edit
page is shown in sort format. However, when adding a new dive, the
initial date shows up in long (normal) format. This in not only
inconsistent, but also introduces the parsing problem, as described
in the mentioned issue.

This can be fixed by using short formatted dates in all cases in
the mobile app. As the screen real estate is precious on mobile,
this seems the most logical choice.

Fixed: #949

Signed-off-by: Jan Mulder <jlmulder@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    rb1d94b2 rb59778a  
    715715                // so if the user changed the date but didn't update the day of the week (most likely behavior, actually),
    716716                // we need to make sure we don't try to parse that
    717                 QString format(QString(prefs.date_format) + QChar(' ') + prefs.time_format);
     717                QString format(QString(prefs.date_format_short) + QChar(' ') + prefs.time_format);
    718718                if (format.contains(QLatin1String("ddd")) || format.contains(QLatin1String("dddd"))) {
    719719                        QString dateFormatToDrop = format.contains(QLatin1String("ddd")) ? QStringLiteral("ddd") : QStringLiteral("dddd");
     
    15241524        QString datestring;
    15251525        if (d)
    1526                 datestring = get_dive_date_string(d->when);
     1526                datestring = get_short_dive_date_string(d->when);
    15271527        return datestring;
    15281528}
Note: See TracChangeset for help on using the changeset viewer.