hamster-applet r683 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r683 - trunk/hamster
- Date: Thu, 29 Jan 2009 17:04:59 +0000 (UTC)
Author: tbaugis
Date: Thu Jan 29 17:04:59 2009
New Revision: 683
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=683&view=rev
Log:
avoid ending up ongoing task if the new one is the same
Modified:
trunk/hamster/db.py
Modified: trunk/hamster/db.py
==============================================================================
--- trunk/hamster/db.py (original)
+++ trunk/hamster/db.py Thu Jan 29 17:04:59 2009
@@ -271,7 +271,12 @@
if day_facts:
last_fact = day_facts[-1]
- if last_fact['end_time'] == None and start_time > last_fact['start_time']:
+ if last_fact['end_time'] == None and last_fact['start_time'] < start_time:
+ #if this is the same, ongoing activity, then there is no need to create another one
+ if last_fact['activity_id'] == activity_id:
+ return last_fact
+
+
delta = (start_time - last_fact['start_time'])
if 60 >= delta.seconds >= 0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]