Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cutmail committed Sep 3, 2019
2 parents 4bacd1c + 26e3a11 commit 55031b5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 30 deletions.
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ android {
targetCompatibility = "8"
sourceCompatibility = "8"
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.2'

defaultConfig {
applicationId "me.cutmail.disasterapp"
minSdkVersion 26
targetSdkVersion 28
versionCode 19
versionName "1.9.0"
targetSdkVersion 29
versionCode 20
versionName "1.9.1"
}
buildTypes {
release {
Expand All @@ -40,19 +40,19 @@ android {
}

dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.10.0@aar') {
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.paging:paging-runtime:2.1.0'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.github.hotchemi:android-rate:1.0.1'
implementation 'com.firebaseui:firebase-ui-firestore:4.3.2'
implementation 'com.google.firebase:firebase-database:17.0.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-database:19.0.0'
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation 'com.google.android.gms:play-services-oss-licenses:16.0.2'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
}

apply plugin: 'com.google.gms.google-services'
1 change: 1 addition & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20,"versionName":"1.9.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public boolean onOptionsItemSelected(MenuItem item) {

switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
if (item.getItemId() == android.R.id.home) {
finish();
return true;
}

return super.onOptionsItemSelected(item);
Expand All @@ -62,15 +61,15 @@ private String getVersionName() {
version = getApplicationContext().getPackageManager().getPackageInfo(
getApplicationContext().getPackageName(), PackageManager.GET_ACTIVITIES).versionName;
} catch (PackageManager.NameNotFoundException e) {
Timber.e(e, e.getMessage());
Timber.e(e);
version = "";
}

return version;
}

@OnClick(R.id.license_container)
void openLicense(View view) {
void openLicense() {
OssLicensesMenuActivity.setActivityTitle(getString(R.string.open_source_licenses));
startActivity(new Intent(this, OssLicensesMenuActivity.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class MainActivity extends AppCompatActivity {
@BindView(R.id.paging_loading)
ProgressBar progressBar;

private FirebaseFirestore firestore;
private CollectionReference collectionReference;

@Override
Expand All @@ -54,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
ButterKnife.bind(this);

firestore = FirebaseFirestore.getInstance();
FirebaseFirestore firestore = FirebaseFirestore.getInstance();
collectionReference = firestore.collection("entries");

setupLayout();
Expand Down Expand Up @@ -114,11 +113,7 @@ private void setupLayout() {
@NonNull @Override public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.entry_list_item, parent, false);
return new ItemViewHolder(view, new ItemViewHolder.OnEntryClickListener() {
@Override public void onItemClick(String title, String url) {
openEntry(title, url);
}
});
return new ItemViewHolder(view, (title, url) -> openEntry(title, url));
}

@Override protected void onLoadingStateChanged(@NonNull LoadingState state) {
Expand All @@ -128,8 +123,6 @@ private void setupLayout() {
progressBar.setVisibility(View.VISIBLE);
break;
case LOADED:
progressBar.setVisibility(View.GONE);
break;
case FINISHED:
progressBar.setVisibility(View.GONE);
break;
Expand Down Expand Up @@ -203,11 +196,7 @@ public interface OnEntryClickListener {

void bind(final Entry entry) {
mTextView.setText(entry.getTitle());
mView.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
listener.onItemClick(entry.getTitle(), entry.getUrl());
}
});
mView.setOnClickListener(v -> listener.onItemClick(entry.getTitle(), entry.getUrl()));
}
}
}

0 comments on commit 55031b5

Please sign in to comment.