This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addViewDisposable(onIHaveArrivedClicked()) | |
private fun onIHaveArrivedClicked(): Disposable { | |
return interactor.getAssessmentClaim(view.getAssessmentId()) | |
.firstOrError() | |
.flatMap { assessment -> | |
interactor.updateSurveyor(assessment.id, assessment.surveyor.copy(arrivedAt = Instant.now())) | |
} | |
.subscribeOn(schedulerProvider.io()) | |
.observeOn(schedulerProvider.ui()) | |
.subscribe({ assessment -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This logic is temporary because of server, | |
* so we have to use hardcode instead of value from {@link AOProxyUrl#GET_API_DEPLOY_BASE_URL}. | |
* | |
* @return AON = www.econumysecure.com, Chatfoss/SyncedUp/SecuredPortal = secure-comm.com. | |
*/ | |
@NonNull | |
private static String composeTempThemePreloadUrl() { | |
if (BuildConfig.FLAVOR.equals("dev")) { | |
return "www.econumysecure.com"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =========================================================== | |
// Constants | |
// =========================================================== | |
// =========================================================== | |
// Fields | |
// =========================================================== | |
// =========================================================== | |
// Constructors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AoAsyncQueryHandler extends AsyncQueryHandler { | |
private WeakReference<AsyncQueryListener> mListener; | |
public AoAsyncQueryHandler(ContentResolver resolver) { | |
super(resolver); | |
} | |
public AoAsyncQueryHandler(ContentResolver resolver, AsyncQueryListener listener) { | |
super(resolver); | |
setQueryListener(listener); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public LoginComponent getLoginComponent() { | |
if (loginComponent == null) { | |
loginComponent = DaggerLoginComponent.builder() | |
.appComponent(getAppComponent()) | |
.build(); | |
} | |
return loginComponent; | |
} | |
public void destroyLoginComponent() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =========================================================== | |
// Constants | |
// =========================================================== | |
// =========================================================== | |
// Fields | |
// =========================================================== | |
// =========================================================== | |
// Constructors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program start(): | |
do_warmup_period(); | |
for (1 to r subruns) | |
for (1 to b days) | |
simulateDay(); | |
end program | |
method simulateDay(): | |
replenish_stock(); | |
place_order(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.codelegs.ao.clean_architecture.presentation.vault.entity.VaultFile; | |
import com.codelegs.ao.utils.mimetype.MimeType; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.runners.MockitoJUnitRunner; | |
import java.util.Comparator; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Observable<UploadResponseBody> uploadFile( | |
@android.support.annotation.NonNull final ArrayList<UploadVaultFile> files) { | |
if (files.size() == 1 && files.get(0).getFilePath() == null) { | |
return mFileRepository.getFileUriForUpload() | |
.flatMap(new Function<String, ObservableSource<UploadResponseBody>>() { | |
@Override | |
public ObservableSource<UploadResponseBody> apply(@NonNull String s) throws Exception { | |
files.get(0).setFilePath(s); | |
return mUploadRepository.uploadVaultFiles(files); |