fix: 修改了拍摄间隔选择失效的问题

This commit is contained in:
2023-06-19 16:50:26 +08:00
parent b8719ccfaa
commit b329f9dc54
2 changed files with 9 additions and 3 deletions

View File

@@ -1479,10 +1479,16 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
}
private void startTakePhoto(int radioPicture) {
if (radioPicture == 1) {
if (radioPicture == 1) { // 手动拍摄
camera.takePictureSnapshot();
} else {
disposable = Observable.interval(1000L, TimeUnit.MILLISECONDS, Schedulers.io())
long period = 1000L;
if (radioPicture == 3) {
period = 2000L;
} else if (radioPicture == 4) {
period = 500L;
}
disposable = Observable.interval(period, TimeUnit.MILLISECONDS, Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new io.reactivex.functions.Consumer<Long>() {
@Override