tDiary.org[tDiary-devel] 日記を隠しているときのLast-Mod ifiedの扱い

< Prev [Date] Next > < Prev [Thread] Next > Index by date Index by thread
こんにちは。こもりやです。

普段日記を書くときに、「この日の日記を隠す」にチェックをいれておいて、
思いついたときにちょこちょこと追記していき、一日の終りに「日記を隠す」
のチェックを外すという使い方をしています。

このような場合、日記を隠していてもLast-Modifiedの値が変化するので、
「はてなあんてな」などの更新チェッカーでは日記が更新されたことになって
しまいます。

そこで、隠されている日記はLast-Modifiedの変更の対象外にするようなパッ
チ(といっても1行ですが)を作ってみたのですが、いかがでしょうか?

--- tdiary.rb~  2003-12-13 21:20:14.000000000 +0900
+++ tdiary.rb   2003-12-15 06:57:43.000000000 +0900
@@ -1279,7 +1279,7 @@
                        lm = Time::at( 0 )
                        @diaries.each_value do |diary|
                                lmd = diary.last_modified
-                               lm = lmd if lm < lmd
+                               lm = lmd if lm < lmd and diary.visible?
                        end
                        lm
                end

-----------------------
Takeru Komoriya
 komoriya@paken.org
 http://www.paken.org/


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
tDiary-devel mailing list
tDiary-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tdiary-devel