mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Move back to previous way of creating at least one test contact
This commit is contained in:
@@ -65,7 +65,7 @@ public class TestDataActivity extends BriarActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onProgressChanged(SeekBar seekBar,
|
public void onProgressChanged(SeekBar seekBar,
|
||||||
int progress, boolean fromUser) {
|
int progress, boolean fromUser) {
|
||||||
contactsTextView.setText(String.valueOf(progress));
|
contactsTextView.setText(String.valueOf(progress + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -151,7 +151,7 @@ public class TestDataActivity extends BriarActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createTestData() {
|
private void createTestData() {
|
||||||
testDataCreator.createTestData(contactsSeekBar.getProgress(),
|
testDataCreator.createTestData(contactsSeekBar.getProgress() + 1,
|
||||||
messagesSeekBar.getProgress(), blogPostsSeekBar.getProgress(),
|
messagesSeekBar.getProgress(), blogPostsSeekBar.getProgress(),
|
||||||
forumsSeekBar.getProgress(), forumPostsSeekBar.getProgress());
|
forumsSeekBar.getProgress(), forumPostsSeekBar.getProgress());
|
||||||
Intent intent = new Intent(this, NavDrawerActivity.class);
|
Intent intent = new Intent(this, NavDrawerActivity.class);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:max="50"
|
android:max="50"
|
||||||
android:min="1"
|
|
||||||
android:progress="20"
|
android:progress="20"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textViewContactsSb"
|
app:layout_constraintEnd_toStartOf="@+id/textViewContactsSb"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
@@ -116,6 +116,8 @@ public class TestDataCreatorImpl implements TestDataCreator {
|
|||||||
@Override
|
@Override
|
||||||
public void createTestData(int numContacts, int numPrivateMsgs,
|
public void createTestData(int numContacts, int numPrivateMsgs,
|
||||||
int numBlogPosts, int numForums, int numForumPosts) {
|
int numBlogPosts, int numForums, int numForumPosts) {
|
||||||
|
if (numContacts == 0) throw new IllegalArgumentException(
|
||||||
|
"Number of contacts must be >= 1");
|
||||||
ioExecutor.execute(() -> {
|
ioExecutor.execute(() -> {
|
||||||
try {
|
try {
|
||||||
createTestDataOnIoExecutor(numContacts, numPrivateMsgs,
|
createTestDataOnIoExecutor(numContacts, numPrivateMsgs,
|
||||||
|
|||||||
Reference in New Issue
Block a user