解决冲突导致的代码丢失

This commit is contained in:
18401019693 2022-08-08 10:44:01 +08:00
parent ea333b24a4
commit f0c4dd1146

View File

@ -110,4 +110,52 @@ public class MainNetManager {
}
}).isDisposed();
}
/**
* 搜索
*
* @param jianKey 簡體關鍵字
* @param fanKey 繁體關鍵字
* @param type 搜索類型 1全部 2主播 3用戶
* @param p 頁碼
*/
public void search(String jianKey, String fanKey, int type, int p, HttpCallback<List<List<SearchModel>>> callback) {
API.get().pdLiveApi(mContext).search(jianKey,fanKey,type,p)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
List<List<SearchModel>> model = listResponseModel.getData().getInfo();
callback.onSuccess(model);
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 搜索
*
* @param jianKey 簡體關鍵字
* @param fanKey 繁體關鍵字
* @param type 搜索類型 1全部 2主播 3用戶
* @param p 頁碼
*/
public void searchNew(String jianKey, String fanKey, int type, int p, HttpCallback<List<SearchModel>> callback) {
API.get().pdLiveApi(mContext).searchNew(jianKey,fanKey,type,p)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
List<SearchModel> model = listResponseModel.getData().getInfo();
callback.onSuccess(model);
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
}