Compare commits

...

2 Commits

Author SHA1 Message Date
Eric B. Budd 80d2c616ca Bump Iris version to 1.0.13 2021-09-22 00:03:28 -05:00
Eric B. Budd 06850ff6fb Fix reply ordering bug 2021-09-21 23:58:43 -05:00
3 changed files with 11 additions and 6 deletions

View File

@ -36,7 +36,7 @@ Iris has a readline interface that can be used to navigate the message corpus.
```bash
%> iris
Welcome to Iris v. 1.0.12. Type "help" for a list of commands.; Ctrl-D or 'quit' to leave.
Welcome to Iris v. 1.0.13. Type "help" for a list of commands.; Ctrl-D or 'quit' to leave.
| ID | U | TIMESTAMP | AUTHOR | TITLE
| 1 | | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
@ -370,7 +370,7 @@ This outputs the current version of Iris, along with messsage, topic, and author
```bash
jennie_minnie@ctrl-c.club~> info
Iris 1.0.12
Iris 1.0.13
13 topics, 0 unread.
50 messages, 0 unread.
10 authors.
@ -404,7 +404,7 @@ iris --version
```
```bash
Iris 1.0.12
Iris 1.0.13
```
---
@ -420,7 +420,7 @@ iris --stats
```
```bash
Iris 1.0.12
Iris 1.0.13
13 topics, 0 unread.
50 messages, 0 unread.
10 authors.

View File

@ -68,6 +68,9 @@
# Changelog
## 1.0.13
* Fix reply ordering bug
## 1.0.12
* Add Asara's "mark all read" functionality
* Fix(?) bug with handling broken UTF-8 characters

View File

@ -8,7 +8,7 @@ require 'time'
# require 'pry' # Only needed for debugging
class Config
VERSION = '1.0.12'
VERSION = '1.0.13'
MESSAGE_FILE = "#{ENV['HOME']}/.iris.messages"
HISTORY_FILE = "#{ENV['HOME']}/.iris.history"
IRIS_SCRIPT = __FILE__
@ -550,7 +550,9 @@ class Message
# Find all messages replying to the current topic, including replies to topics
# which have been edited.
def replies
(Corpus.find_all_by_parent_hash(hash) + ((edit_predecessor && edit_predecessor.replies) || [])).compact
all_replies = Corpus.find_all_by_parent_hash(hash)
all_replies += ((edit_predecessor && edit_predecessor.replies) || [])
all_replies.compact.sort_by{ |reply| Corpus.index_of(reply) }
end
def id