bobbyache / CodeCat

Store and search for code snippets
GNU General Public License v3.0
0 stars 0 forks source link

Date Modified always set to today for both CodeGroup and Qik. #105

Closed bobbyache closed 7 years ago

bobbyache commented 7 years ago

Date modified is always displayed as today's date after a save. Every time the index is saved, the date is modified for all index items. `

  <IndexItem ID="1bdd69bb-9757-47b8-b46e-c91c508a405b">
    <Title>ANTLR Notes: Qik, Xess, and language idea scripts.</Title>
    <DateCreated>2016-12-01T09:58:36.4091121+02:00</DateCreated>
    <DateModified>2017-03-27T07:47:57.5274478+02:00</DateModified>
    <Keywords>ANTLR,GRAMMAR,INTERPRETER,LANGUAGE,QIK,XESS</Keywords>
    <Syntax></Syntax>
  </IndexItem>

`

The issue is because the SetKeywords() method in KeywordIndexItem sets the modified date. When the keywords are populated as the index is loaded the DateModified property gets overwritten because the method is called and the DateModified is reset to NOW.

This bug seems to have been introduced when it was noticed at one point that the DateModified was not being set on the Index Item when keywords were modified.

Constructor to be modified so that it does not set DateModified when loading key phrases.