Skip to content

Commit db46162

Browse files
SUPERCILEXsamtstern
authored andcommitted
Fix indentation (#14)
1 parent 663e558 commit db46162

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

firestore/README.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ live query updates:
7777

7878
```java
7979
query.addSnapshotListener(new EventListener<QuerySnapshot>() {
80-
@Override
81-
public void onEvent(@Nullable QuerySnapshot snapshot,
82-
@Nullable FirebaseFirestoreException e) {
83-
if (e != null) {
84-
// Handle error
85-
//...
86-
return;
87-
}
88-
89-
// Convert query snapshot to a list of chats
90-
List<Chat> chats = snapshot.toObjects(Chat.class);
91-
92-
// Update UI
93-
// ...
80+
@Override
81+
public void onEvent(@Nullable QuerySnapshot snapshot,
82+
@Nullable FirebaseFirestoreException e) {
83+
if (e != null) {
84+
// Handle error
85+
//...
86+
return;
9487
}
88+
89+
// Convert query snapshot to a list of chats
90+
List<Chat> chats = snapshot.toObjects(Chat.class);
91+
92+
// Update UI
93+
// ...
94+
}
9595
});
9696
```
9797

@@ -186,24 +186,22 @@ methods of the adapter:
186186

187187
```java
188188
FirestoreRecyclerAdapter adapter = new FirestoreRecyclerAdapter<Chat, ChatHolder>(options) {
189-
190-
// ...
189+
// ...
191190

192-
@Override
193-
public void onDataChanged() {
194-
// Called each time there is a new query snapshot. You may want to use this method
195-
// to hide a loading spinner or check for the "no documents" state and update your UI.
196-
// ...
197-
}
198-
199-
@Override
200-
public void onError(FirebaseFirestoreException e) {
201-
// Called when there is an error getting a query snapshot. You may want to update
202-
// your UI to display an error message to the user.
203-
// ...
204-
}
191+
@Override
192+
public void onDataChanged() {
193+
// Called each time there is a new query snapshot. You may want to use this method
194+
// to hide a loading spinner or check for the "no documents" state and update your UI.
195+
// ...
196+
}
205197

206-
}
198+
@Override
199+
public void onError(FirebaseFirestoreException e) {
200+
// Called when there is an error getting a query snapshot. You may want to update
201+
// your UI to display an error message to the user.
202+
// ...
203+
}
204+
};
207205
```
208206

209207

0 commit comments

Comments
 (0)