正在查看: OLX India v19.42.007 应用的 FollowIntentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 FollowIntentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.olxgroup.panamera.app.common.services;
import android.content.Intent;
import com.olxgroup.panamera.app.common.infra.m2;
import com.olxgroup.panamera.app.common.utils.u;
import com.olxgroup.panamera.domain.buyers.favourites.repository.FavouritesRepository;
import com.olxgroup.panamera.domain.users.common.entity.UsersListing;
import com.olxgroup.panamera.domain.users.profile.tracking.ProfileTrackingService;
import java.util.ArrayList;
import java.util.List;
import olx.com.delorean.domain.entity.ApiDataResponse;
import olx.com.delorean.domain.interactor.UseCaseObserver;
import olx.com.delorean.domain.repository.UserSessionRepository;
public class FollowIntentService extends e {
FavouritesRepository d;
UserSessionRepository e;
com.naspers.ragnarok.universal.ui.favourites.i f;
class a extends UseCaseObserver {
a() {
}
public void onNext(UsersListing usersListing) {
if (usersListing == null || usersListing.getUsers() == null || usersListing.getUsers().isEmpty()) {
return;
}
((ProfileTrackingService) m2.a.u2().getValue()).socialBulkFollow(com.olxgroup.panamera.app.common.tracking.o.h().getOriginSocialFollowing(), usersListing.getUsers().size());
}
}
class b extends UseCaseObserver {
final List a;
b(List list) {
this.a = list;
}
public void onNext(ApiDataResponse apiDataResponse) {
u.c(this.a);
}
}
public FollowIntentService() {
super("FollowIntentService");
}
private void d(List list) {
this.d.addFavouriteUser(this.e.getUserIdLogged(), list).subscribeOn(io.reactivex.schedulers.a.c()).observeOn(io.reactivex.android.schedulers.a.a()).subscribe(new b(list));
}
private void e() {
this.d.getFavouriteUsers(this.e.getUserIdLogged(), (String) null).subscribeOn(io.reactivex.schedulers.a.c()).observeOn(io.reactivex.android.schedulers.a.a()).subscribe(new a());
}
private void f(List list) {
this.d.removeFavouriteUser(this.e.getUserIdLogged(), list).subscribeOn(io.reactivex.schedulers.a.c()).observeOn(io.reactivex.android.schedulers.a.a()).subscribe(new UseCaseObserver());
}
@Override
public void onCreate() {
super.onCreate();
}
@Override
protected void onHandleIntent(Intent intent) {
ArrayList<String> stringArrayListExtra;
stringArrayListExtra = intent.getStringArrayListExtra("followingUsersIds");
String action = intent.getAction();
action.hashCode();
switch (action) {
case "com.olx.delorean.action.GET_FOLLOWING":
e();
break;
case "com.olx.delorean.action.REMOVE_FOLLOWING":
f(stringArrayListExtra);
break;
case "com.olx.delorean.action.ADD_FOLLOWING":
d(stringArrayListExtra);
break;
}
}
}