Exemplo n.º 1
0
        private void OpenChat(TextSecureDirectory.Directory contacts)
        {
            Recipients recipients = DatabaseFactory.getRecipientDatabase().GetOrCreateRecipients(SelectedContact); //RecipientFactory.getRecipientsFromContact(SelectedContact);
            var        chatid     = DatabaseFactory.getThreadDatabase().GetThreadIdForRecipients(recipients, 0);
            var        chat       = DatabaseFactory.getThreadDatabase().Get(chatid);

            OpenChat(chat);
        }
Exemplo n.º 2
0
        /*private static bool hasBracketedNumber(String recipient)
         * {
         *  int openBracketIndex = recipient.IndexOf('<');
         *
         *  return (openBracketIndex != -1) &&
         *         (recipient.IndexOf('>', openBracketIndex) != -1);
         * }
         *
         * private static String parseBracketedNumber(String recipient)
         * {
         *  int begin = recipient.IndexOf('<');
         *  int end = recipient.IndexOf('>', begin);
         *  String value = recipient.Substring(begin + 1, end);
         *
         *  return value;
         * }*/

        internal static Recipients getRecipientsFromContact(TextSecureDirectory.Directory selectedContact)
        {
            return(DatabaseFactory.getRecipientDatabase().GetOrCreateRecipients(selectedContact));
        }