lundi 29 juin 2015

Quickblox Login name cannot displayed in the cell row

I have using Quickblox framework for chatting purpose.login value set to each cell.row. but some values displaying "0" in cell.row. I have attached the below images and shows login as a number and name. Below code the variable "testDict" return null value sometime.

    QBChatDialog *chatDialog = [ChatService shared].dialogs[idx];
    NSDictionary *testDict=[ChatService shared].usersAsDictionary[@(chatDialog.recipientID)];
    QBUUser *recipient = [ChatService shared].usersAsDictionary[@(chatDialog.recipientID)];
    NSString *test=recipient.login == nil ? (recipient.fullName == nil ? [NSString stringWithFormat:@"%lu", (unsigned long)recipient.ID] : recipient.fullName) : recipient.login;

    NSLog(@"DialogList:%@",testDict);

enter image description here

Aucun commentaire:

Enregistrer un commentaire