Skip to content

Commit f1e14e6

Browse files
Fix a couple UI inconsistencies
1 parent dfd720b commit f1e14e6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/src/main/java/com/beemdevelopment/aegis/ui/views/EntryAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ private void updateShownEntries() {
375375
}
376376

377377
sortShownEntries();
378+
checkPeriodUniformity();
378379
_view.onListChange();
379380
notifyDataSetChanged();
380381
}
@@ -669,6 +670,10 @@ public int getMostFrequentPeriod() {
669670
return -1;
670671
}
671672

673+
if (infos.size() == 1) {
674+
return infos.get(0).getPeriod();
675+
}
676+
672677
Map<Integer, Integer> occurrences = new HashMap<>();
673678
for (TotpInfo info : infos) {
674679
int period = info.getPeriod();

app/src/main/res/layout/activity_edit_entry.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
</LinearLayout>
9999
<LinearLayout
100100
android:layout_width="match_parent"
101-
android:layout_height="wrap_content"
101+
android:layout_height="match_parent"
102102
android:orientation="horizontal"
103103
android:layout_marginTop="10dp"
104104
android:layout_marginStart="44.5dp">
@@ -110,8 +110,9 @@
110110
android:layout_weight="1">
111111
<com.google.android.material.textfield.TextInputEditText
112112
android:id="@+id/text_issuer"
113+
android:maxLines="1"
113114
android:layout_width="match_parent"
114-
android:layout_height="match_parent"
115+
android:layout_height="wrap_content"
115116
android:inputType="text"/>
116117
</com.google.android.material.textfield.TextInputLayout>
117118
<com.google.android.material.textfield.TextInputLayout

0 commit comments

Comments
 (0)