Skip to content

Commit 79433b1

Browse files
committed
Don't get Gist id until needed
1 parent 6716c22 commit 79433b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/com/github/mobile/ui/gist/GistsViewActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ protected void onCreate(Bundle savedInstanceState) {
116116
// Support opening this activity with a single Gist that may be present
117117
// in the intent but not currently present in the store
118118
if (gists == null && gist != null) {
119-
String id = gist.getId();
120119
if (gist.getCreatedAt() != null) {
121-
Gist stored = store.getGist(id);
120+
Gist stored = store.getGist(gist.getId());
122121
if (stored == null)
123122
store.addGist(gist);
124123
}

0 commit comments

Comments
 (0)