Skip to content

Commit

Permalink
Merge branch 'main' into Alireza
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhav2399 authored Apr 6, 2024
2 parents 8b93499 + 1f228c9 commit e271d03
Show file tree
Hide file tree
Showing 66 changed files with 1,209 additions and 372 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Report issues of OpenTracks features
title: ''
labels: potential bug
labels: ''
assignees: ''

---
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/data_not_recorded.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Data not recorded
about: Somehow OpenTracks did not record GPS data
name: Data not recorded
about: Somehow OpenTracks did not record GPS data
title: ''
labels: potential bug
labels: ''
assignees: ''

---
Expand All @@ -21,4 +21,4 @@ assignees: ''
- Device: [e.g. Nexus 7 (2013)]
- OS: [e.g. LineageOS 15.1]
- OpenTracks version: [e.g. v3.2.4]
- OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]
- OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe briefly your feature.**
A clear and concise description of what is the general purpose of the feature is. E.g., adding new ski related statistics services that calculate... [...]. Also if you believe that it relates to other features. Create a link to these features

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand All @@ -17,4 +17,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here. .
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private void storeTrackMetaData(ContentProviderUtils contentProviderUtils, Track
viewBinding.trackEditActivityType.getText().toString(), viewBinding.trackEditDescription.getText().toString(),
contentProviderUtils);
}

@Override
//Deprecated this method beacause its deprecated
@Deprecated
public void onBackPressed() {
if (isDiscarding) {
return;
Expand Down
14 changes: 6 additions & 8 deletions src/main/java/de/dennisguse/opentracks/chart/ChartFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
}
if (PreferencesUtils.isKey(R.string.stats_rate_key, key)) {
boolean reportSpeed = PreferencesUtils.isReportSpeed(activityTypeLocalized);
if (reportSpeed != viewBinding.chartView.getReportSpeed()) {
if (reportSpeed != viewBinding.chartView.isReportSpeed()) {
viewBinding.chartView.setReportSpeed(reportSpeed);
viewBinding.chartView.applyReportSpeed();

Expand All @@ -105,17 +105,14 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
/**
* A runnable that will setFrequency the orange pointer as appropriate and redraw.
*/
private final Runnable updateChart = new Runnable() {
@Override
public void run() {
private final Runnable updateChart = ()->{
if (!isResumed()) {
return;
}

viewBinding.chartView.setShowPointer(isSelectedTrackRecording());
viewBinding.chartView.invalidate();
}
};
};


@Override
Expand Down Expand Up @@ -166,7 +163,7 @@ public void onTrackUpdated(Track track) {

activityTypeLocalized = track.getActivityTypeLocalized();
boolean reportSpeed = PreferencesUtils.isReportSpeed(activityTypeLocalized);
if (reportSpeed != viewBinding.chartView.getReportSpeed()) {
if (reportSpeed != viewBinding.chartView.isReportSpeed()) {
viewBinding.chartView.setReportSpeed(reportSpeed);
viewBinding.chartView.applyReportSpeed();
}
Expand All @@ -186,6 +183,7 @@ public void clearTrackPoints() {
}
}

@Override
public void onSampledInTrackPoint(@NonNull TrackPoint trackPoint, @NonNull TrackStatistics trackStatistics) {
if (isResumed()) {
ChartPoint point = ChartPoint.create(trackStatistics, trackPoint, trackPoint.getSpeed(), chartByDistance, viewBinding.chartView.getUnitSystem());
Expand Down Expand Up @@ -256,7 +254,7 @@ private synchronized void pauseTrackDataHub() {
* Returns true if the selected track is recording.
* Needs to be synchronized because trackDataHub can be accessed by multiple threads.
*/
@Deprecated
@Deprecated(since = "verision x.x",forRemoval = true)
//TODO Should not be dynamic but instead set while instantiating, i.e., newFragment().
private synchronized boolean isSelectedTrackRecording() {
return trackDataHub != null && trackDataHub.isSelectedTrackRecording();
Expand Down
Loading

0 comments on commit e271d03

Please sign in to comment.