导航菜单

页面标题

页面副标题

OLX India v19.42.007 - MarkAsSoldActivity.java 源代码

正在查看: OLX India v19.42.007 应用的 MarkAsSoldActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package olx.com.delorean.activities;

import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;
import com.olx.southasia.p;
import com.olxgroup.panamera.app.common.helpers.DialogHelper;
import com.olxgroup.panamera.app.common.utils.l0;
import com.olxgroup.panamera.domain.buyers.common.entity.ad.AdItem;
import java.io.Serializable;
import olx.com.delorean.domain.Constants;
import olx.com.delorean.domain.interactor.GetAdUseCase;
import olx.com.delorean.domain.interactor.UseCaseObserver;
import olx.com.delorean.fragments.MarkAsSoldFragment;

public class MarkAsSoldActivity extends d {
    private MarkAsSoldFragment i0;
    GetAdUseCase j0;

    class a extends UseCaseObserver {
        a() {
        }

        @Override
        public void onNext(AdItem adItem) {
            super.onNext(adItem);
            DialogHelper.e(MarkAsSoldActivity.this);
            MarkAsSoldActivity.this.getIntent().putExtra(Constants.ExtraKeys.ITEM_DETAILS_AD_EXTRA, (Serializable) adItem);
            MarkAsSoldActivity.this.getIntent().putExtra("itemId", adItem.getId());
            MarkAsSoldActivity markAsSoldActivity = MarkAsSoldActivity.this;
            markAsSoldActivity.b3(markAsSoldActivity.i0, true);
        }

        @Override
        public void onError(Throwable th) {
            super.onError(th);
            l0.a(th);
            DialogHelper.e(MarkAsSoldActivity.this);
            Toast.makeText((Context) MarkAsSoldActivity.this, p.error_title, 0).show();
            MarkAsSoldActivity.this.setResult(0);
            MarkAsSoldActivity.this.finish();
        }
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        M2().setTitle(getString(p.mark_as_sold_title));
        n3(false);
        if (bundle == null || getSupportFragmentManager().p0(MarkAsSoldFragment.class.getName()) == null) {
            this.i0 = new MarkAsSoldFragment();
            if (getIntent().hasExtra(Constants.ExtraKeys.ITEM_DETAILS_AD_EXTRA)) {
                b3(this.i0, true);
                return;
            }
            DialogHelper.j(this, (String) null, getString(p.get_ad_item_dialog_message));
            this.j0.execute(p3(), GetAdUseCase.Params.forFullAd(getIntent().getStringExtra("itemId")));
        }
    }

    protected void onDestroy() {
        super/*com.olxgroup.panamera.app.common.activities.c*/.onDestroy();
        this.j0.dispose();
    }

    protected final UseCaseObserver p3() {
        return new a();
    }
}