Skip to content

Commit

Permalink
Merge pull request #51 from froyomu/master
Browse files Browse the repository at this point in the history
QIMSDk增加支持本地人员和群搜索的api;
  • Loading branch information
froyomu authored Jun 24, 2019
2 parents 3ffc2f7 + 5cfe4cb commit 33a1303
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions imlib/src/main/java/com/qunar/im/ui/sdk/QIMSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.ViewTarget;
import com.facebook.imagepipeline.core.ImagePipelineFactory;
import com.qunar.im.base.module.IMGroup;
import com.qunar.im.base.module.Nick;
import com.qunar.im.log.LogDatabaseManager;
import com.qunar.im.ui.presenter.impl.QChatLoginPresenter;
import com.qunar.im.utils.ConnectionUtil;
Expand Down Expand Up @@ -342,6 +344,24 @@ public Fragment getContactsFragment(){
return QtalkNavicationService.getInstance().getNavConfigResult().RNAndroidAbility.RNContactView ? new RNContactsFragment() : new BuddiesFragment();
}

/**
* 搜索本地组织架构人员
* @param ser 关键字
* @param limit
*/
public List<Nick> searchLocalUser(String ser, int limit){
return ConnectionUtil.getInstance().SelectContactsByLike(ser,limit);
}

/**
* 搜索本地群组
* @param ser 关键字
* @param limit
*/
public List<IMGroup> searchLocalMuc(String ser, int limit){
return ConnectionUtil.getInstance().SelectIMGroupByLike(ser,limit);
}

/**
* 无domain的userid
* @return
Expand Down
1 change: 1 addition & 0 deletions imlib/src/main/java/com/qunar/im/ui/util/EmotionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public static boolean isExistsEmoticon(String shortCut, String pkgId, boolean ch
return false;
} else {
if (defaultEmotion!=null&&defaultEmotion.packgeId.equals(pkgId)) return defaultEmotion.containKey(shortCut);
else if(defaultEmotion1 !=null && defaultEmotion1.packgeId.equals(pkgId)) return defaultEmotion1.containKey(shortCut);
return checkExt && pkgId2Name.containsKey(pkgId) &&
extEmotions.containsKey(pkgId2Name.get(pkgId))
&& extEmotions.get(pkgId2Name.get(pkgId)).containKey(shortCut);
Expand Down

0 comments on commit 33a1303

Please sign in to comment.