mirror of https://github.com/Calamitous/iris.git
Fix bug preventing replying to last viewed topic
This commit is contained in:
parent
958d09c5bc
commit
20b4adfc16
2
TODO.md
2
TODO.md
|
@ -9,7 +9,7 @@
|
|||
* Message editing
|
||||
* Allow shelling out to editor for message editing?
|
||||
* Gracefully handle bad message files
|
||||
* Fix topic selection when replying without topic ID
|
||||
* ~Fix topic selection when replying without topic ID~
|
||||
* ~Automatically display topics when opening~
|
||||
* Add column headers for topics
|
||||
* Mark unread topics/topics with unread replies in topics list
|
||||
|
|
5
iris.rb
5
iris.rb
|
@ -472,14 +472,13 @@ class Interface
|
|||
Display.say
|
||||
end
|
||||
|
||||
def reply(topic_id = nil)
|
||||
topic_id ||= @reply_topic
|
||||
def reply(topic_id = @reply_topic)
|
||||
unless topic_id
|
||||
Display.say "I can't reply to nothing! Include a topic ID or view a topic to reply to."
|
||||
return
|
||||
end
|
||||
|
||||
if parent = Corpus.find_topic_by_id(topic_id)
|
||||
if parent = (Corpus.find_topic_by_id(topic_id) || Corpus.find_topic_by_hash(topic_id))
|
||||
@reply_topic = parent.hash
|
||||
else
|
||||
Display.say "Could not reply; unable to find a topic with ID '#{topic_id}'"
|
||||
|
|
Loading…
Reference in New Issue