解决冲突导致的代码丢失
This commit is contained in:
parent
ea333b24a4
commit
f0c4dd1146
@ -110,4 +110,52 @@ public class MainNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user