NewTribeApi.smali
.class public Lcom/sandboxol/center/web/NewTribeApi;
.super Ljava/lang/Object;
.source "NewTribeApi.java"
# static fields
.field private static final api:Lcom/sandboxol/center/web/http/ITribeApi;
# direct methods
.method static constructor <clinit>()V
.registers 2
.line 1
invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getApp()Lcom/sandboxol/common/base/app/BaseApplication;
move-result-object v0
invoke-virtual {v0}, Lcom/sandboxol/common/base/app/BaseApplication;->getMetaDataBaseUrl()Ljava/lang/String;
move-result-object v0
const-class v1, Lcom/sandboxol/center/web/http/ITribeApi;
invoke-static {v0, v1}, Lcom/sandboxol/common/retrofit/RetrofitFactory;->httpsCreate(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/sandboxol/center/web/http/ITribeApi;
sput-object v0, Lcom/sandboxol/center/web/NewTribeApi;->api:Lcom/sandboxol/center/web/http/ITribeApi;
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static synthetic a(Landroid/content/Context;Lcom/sandboxol/common/base/web/OnResponseListener;)V
.registers 2
.line 1
invoke-static {p0, p1}, Lcom/sandboxol/center/web/NewTribeApi;->tribeMember(Landroid/content/Context;Lcom/sandboxol/common/base/web/OnResponseListener;)V
return-void
.end method
.method public static tribeMember(Landroid/content/Context;Lcom/sandboxol/common/base/web/OnResponseListener;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Lcom/sandboxol/common/base/web/OnResponseListener<",
"Ljava/util/List<",
"Lcom/sandboxol/greendao/entity/TribeMember;",
">;>;)V"
}
.end annotation
.line 1
invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->newInstance()Lcom/sandboxol/center/entity/AccountCenter;
move-result-object v0
iget-object v0, v0, Lcom/sandboxol/center/entity/AccountCenter;->login:Landroidx/databinding/ObservableField;
invoke-virtual {v0}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Boolean;
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-eqz v0, :cond_49
.line 2
new-instance v0, Lcom/sandboxol/center/web/ga;
invoke-direct {v0, p0, p1}, Lcom/sandboxol/center/web/ga;-><init>(Landroid/content/Context;Lcom/sandboxol/common/base/web/OnResponseListener;)V
invoke-static {p1, v0}, Lcom/sandboxol/common/utils/HttpUtils;->getRetryCommand(Lcom/sandboxol/common/base/web/OnResponseListener;Lrx/functions/Action0;)Lcom/sandboxol/common/command/ReplyCommand;
move-result-object v0
.line 3
sget-object v1, Lcom/sandboxol/center/web/NewTribeApi;->api:Lcom/sandboxol/center/web/http/ITribeApi;
invoke-static {}, Lcom/sandboxol/common/utils/CommonHelper;->getLanguage()Ljava/lang/String;
move-result-object v2
invoke-interface {v1, v2}, Lcom/sandboxol/center/web/http/ITribeApi;->tribeMember(Ljava/lang/String;)Lrx/Observable;
move-result-object v1
check-cast p0, Lcom/trello/rxlifecycle/a;
sget-object v2, Lcom/trello/rxlifecycle/ActivityEvent;->DESTROY:Lcom/trello/rxlifecycle/ActivityEvent;
.line 4
invoke-interface {p0, v2}, Lcom/trello/rxlifecycle/a;->bindUntilEvent(Lcom/trello/rxlifecycle/ActivityEvent;)Lrx/Observable$Transformer;
move-result-object p0
invoke-virtual {v1, p0}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
move-result-object p0
.line 5
invoke-static {}, Lrx/schedulers/Schedulers;->io()Lrx/Scheduler;
move-result-object v1
invoke-virtual {p0, v1}, Lrx/Observable;->subscribeOn(Lrx/Scheduler;)Lrx/Observable;
move-result-object p0
.line 6
invoke-static {}, Lrx/android/schedulers/AndroidSchedulers;->mainThread()Lrx/Scheduler;
move-result-object v1
invoke-virtual {p0, v1}, Lrx/Observable;->observeOn(Lrx/Scheduler;)Lrx/Observable;
move-result-object p0
new-instance v1, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;
invoke-direct {v1, p1, v0}, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;-><init>(Lcom/sandboxol/common/base/web/OnResponseListener;Lcom/sandboxol/common/command/ReplyCommand;)V
.line 7
invoke-virtual {p0, v1}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
:cond_49
return-void
.end method