~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/model/questionmessage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-18 13:13:24 UTC
  • mfrom: (13042.2.19 consolidate-spam-js)
  • Revision ID: launchpad@pqm.canonical.com-20110518131324-xov44tirpkullbtq
[r=benji][ui=none][bug=782252] Consolidates duplicated javascript for
 the hide comment work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
    @cachedproperty
54
54
    def index(self):
 
55
        return list(self.question.messages).index(self)
 
56
 
 
57
    @cachedproperty
 
58
    def display_index(self):
55
59
        # Return the index + 1 so that messages appear 1-indexed in the UI.
56
 
        return list(self.question.messages).index(self) + 1
 
60
        return self.index + 1
57
61
 
58
62
    @property
59
63
    def visible(self):