Package 

Class PollKt

    • Method Summary

      Modifier and Type Method Description
      final static Boolean canCastVote(Poll $self) Returns true if the current user can cast another vote on this poll.
      final static String getSubtitle(Poll $self, Context context) Returns the subtitle for the poll based on the maximum number of votes allowed.
      final static String displayedName(Poll $self, User currentUser, Boolean autoTranslationEnabled) The poll name to display: the translation into currentUser's language when autoTranslationEnabled and available, the original name otherwise.
      final static String displayedText(Option $self, User currentUser, Boolean autoTranslationEnabled) The option text to display, following the same rules as Poll.displayedName.
      final static String displayedText(Answer $self, User currentUser, Boolean autoTranslationEnabled) The answer text to display, following the same rules as Poll.displayedName.
      final static Boolean hasTranslation(Poll $self, User currentUser) Whether the poll name or any option has a translation into currentUser's language.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • canCastVote

         final static Boolean canCastVote(Poll $self)

        Returns true if the current user can cast another vote on this poll.

      • getSubtitle

         final static String getSubtitle(Poll $self, Context context)

        Returns the subtitle for the poll based on the maximum number of votes allowed.

      • displayedName

         final static String displayedName(Poll $self, User currentUser, Boolean autoTranslationEnabled)

        The poll name to display: the translation into currentUser's language when autoTranslationEnabled and available, the original name otherwise.

      • displayedText

         final static String displayedText(Option $self, User currentUser, Boolean autoTranslationEnabled)

        The option text to display, following the same rules as Poll.displayedName.

      • displayedText

         final static String displayedText(Answer $self, User currentUser, Boolean autoTranslationEnabled)

        The answer text to display, following the same rules as Poll.displayedName.

      • hasTranslation

         final static Boolean hasTranslation(Poll $self, User currentUser)

        Whether the poll name or any option has a translation into currentUser's language. Answers are not included, since each one is written by a different user.