]> Some of my projects - localmylist.git/commitdiff
Use the data from the sent command rather than the config.
authorAPTX <marek321@gmail.com>
Sat, 27 Apr 2013 15:46:36 +0000 (17:46 +0200)
committerAPTX <marek321@gmail.com>
Sat, 27 Apr 2013 15:46:36 +0000 (17:46 +0200)
The config might change from what has been used with the command.

localmylist/requesthandler.cpp

index c296f36b64a8c33c590de755239d18660d656aea..a2b2b08663fb6f0087afb0aa514837780266cc12 100644 (file)
@@ -552,13 +552,13 @@ void RequestHandler::myListAddReplyRecieved(bool success)
                f.entryUpdate = QDateTime::currentDateTime();
                f.myUpdate = QDateTime::currentDateTime();
 
-               if (MyList::instance()->settings()->get("myListDefaultViewed", false))
+               if (reply->command().viewed() == MyListState::Viewed)
                        f.myWatched = QDateTime::currentDateTime();
 
-               f.myState = State(MyList::instance()->settings()->get("myListDefaultState", 1));
-               f.mySource = MyList::instance()->settings()->get("myListDefaultSource", QString());
-               f.myStorage = MyList::instance()->settings()->get("myListDefaultStorage", QString());
-               f.myOther = MyList::instance()->settings()->get("myListDefaultOther", QString());
+               f.myState = reply->command().state();
+               f.mySource = reply->command().state();
+               f.myStorage = reply->command().storage();
+               f.myOther = reply->command().other();
                db->setFile(f);
        }