Commit 645afab0 authored by Rufus's avatar Rufus

Merge branch 'master' of https://github.com/cbeyls/fosdem-companion-android

Set URL to test

# Conflicts:
#	README.md
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/at/linuxtage/companion/GLTApplication.java
#	app/src/main/java/at/linuxtage/companion/activities/AppCompatPreferenceActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/BaseActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/EventDetailsActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/MainActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/PersonInfoActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/RoomImageDialogActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/SearchResultActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/SettingsActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/TrackScheduleActivity.java
#	app/src/main/java/at/linuxtage/companion/activities/TrackScheduleEventActivity.java
#	app/src/main/java/at/linuxtage/companion/adapters/BookmarksAdapter.java
#	app/src/main/java/at/linuxtage/companion/adapters/EventsAdapter.java
#	app/src/main/java/at/linuxtage/companion/adapters/RecyclerViewCursorAdapter.java
#	app/src/main/java/at/linuxtage/companion/alarms/FosdemAlarmManager.java
#	app/src/main/java/at/linuxtage/companion/api/GLTApi.java
#	app/src/main/java/at/linuxtage/companion/api/LiveRoomStatusesLiveData.java
#	app/src/main/java/at/linuxtage/companion/api/RoomStatusesLiveData.java
#	app/src/main/java/at/linuxtage/companion/db/DatabaseHelper.java
#	app/src/main/java/at/linuxtage/companion/db/DatabaseManager.java
#	app/src/main/java/at/linuxtage/companion/db/LocalBroadcastCursor.java
#	app/src/main/java/at/linuxtage/companion/fragments/BaseLiveListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/BookmarksListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/EventDetailsFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/LiveFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/MapFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/MessageDialogFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/NextLiveListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/NowLiveListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/PersonInfoListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/PersonsListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/RecyclerViewFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/RoomImageDialogFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/SearchResultListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/SmoothListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/TrackScheduleListFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/TracksFragment.java
#	app/src/main/java/at/linuxtage/companion/fragments/TracksListFragment.java
#	app/src/main/java/at/linuxtage/companion/livedata/AsyncTaskLiveData.java
#	app/src/main/java/at/linuxtage/companion/loaders/BaseLiveLoader.java
#	app/src/main/java/at/linuxtage/companion/loaders/SimpleCursorLoader.java
#	app/src/main/java/at/linuxtage/companion/loaders/TrackScheduleLoader.java
#	app/src/main/java/at/linuxtage/companion/model/Day.java
#	app/src/main/java/at/linuxtage/companion/model/Event.java
#	app/src/main/java/at/linuxtage/companion/model/Person.java
#	app/src/main/java/at/linuxtage/companion/model/RoomStatus.java
#	app/src/main/java/at/linuxtage/companion/model/Track.java
#	app/src/main/java/at/linuxtage/companion/parsers/EventsParser.java
#	app/src/main/java/at/linuxtage/companion/providers/BookmarksExportProvider.java
#	app/src/main/java/at/linuxtage/companion/providers/SearchSuggestionProvider.java
#	app/src/main/java/at/linuxtage/companion/services/AlarmIntentService.java
#	app/src/main/java/at/linuxtage/companion/utils/ArrayUtils.java
#	app/src/main/java/at/linuxtage/companion/utils/ThemeUtils.java
#	app/src/main/java/at/linuxtage/companion/viewmodels/EventDetailsViewModel.java
#	app/src/main/java/at/linuxtage/companion/viewmodels/EventViewModel.java
#	app/src/main/java/at/linuxtage/companion/widgets/AdapterLinearLayout.java
#	app/src/main/java/at/linuxtage/companion/widgets/ScrimInsetsFrameLayout.java
#	app/src/main/java/at/linuxtage/companion/widgets/SlidingTabLayout.java
#	app/src/main/java/be/digitalia/fosdem/utils/DateUtils.java
#	app/src/main/java/be/digitalia/fosdem/widgets/ForegroundLinearLayout.java
#	app/src/main/java/com/viewpagerindicator/UnderlinePageIndicator.java
#	app/src/main/res/drawable-hdpi/campusmap.png
#	app/src/main/res/layout/fragment_event_details.xml
#	app/src/main/res/layout/fragment_live.xml
#	app/src/main/res/layout/fragment_tracks.xml
#	app/src/main/res/layout/include_navigation_drawer.xml
#	app/src/main/res/layout/item_event.xml
#	app/src/main/res/layout/item_schedule_event.xml
#	app/src/main/res/layout/main.xml
parent 85ba21df
......@@ -6,12 +6,13 @@ It's a fork of [FOSDEM companion](https://github.com/cbeyls/fosdem-companion-and
Donations to Grazer Linuxtage are possible via Bitcoin: [1GLTBBirbj8GZ8uY1gwovZ1QEMjfWu3rWT](bitcoin:1GLTBBirbj8GZ8uY1gwovZ1QEMjfWu3rWT)
<a href="https://f-droid.org/repository/browse/?fdfilter=fosdem&fdid=be.digitalia.fosdem" target="_blank">
<img src="https://f-droid.org/badge/get-it-on.png" height="80"/>
</a>
<a href="https://play.google.com/store/apps/details?id=be.digitalia.fosdem" target="_blank">
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="80"/>
</a>
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/at.linuxtage.companion/)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png"
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=at.linuxtage.companion)
## How to build
......
......@@ -25,7 +25,7 @@ import at.linuxtage.companion.utils.NfcUtils.CreateNfcAppDataCallback;
import at.linuxtage.companion.utils.ThemeUtils;
import at.linuxtage.companion.viewmodels.BookmarkStatusViewModel;
import at.linuxtage.companion.viewmodels.EventViewModel;
import be.digitalia.fosdem.widgets.BookmarkStatusAdapter;
import at.linuxtage.companion.widgets.BookmarkStatusAdapter;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomappbar.BottomAppBar;
......
package be.digitalia.companion.activities;
package at.linuxtage.companion.activities;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import be.digitalia.companion.R;
import be.digitalia.companion.fragments.ExternalBookmarksListFragment;
import be.digitalia.companion.utils.NfcUtils;
import at.linuxtage.companion.R;
import at.linuxtage.companion.fragments.ExternalBookmarksListFragment;
import at.linuxtage.companion.utils.NfcUtils;
public class ExternalBookmarksActivity extends AppCompatActivity {
......
......@@ -41,6 +41,7 @@ import at.linuxtage.companion.BuildConfig;
import at.linuxtage.companion.R;
import at.linuxtage.companion.api.GLTApi;
import at.linuxtage.companion.api.GLTApi;
import at.linuxtage.companion.api.GLTUrls;
import at.linuxtage.companion.db.AppDatabase;
import at.linuxtage.companion.fragments.*;
import at.linuxtage.companion.livedata.SingleEvent;
......@@ -184,7 +185,7 @@ public class MainActivity extends AppCompatActivity implements NfcUtils.CreateNf
@Override
public void onClick(DialogInterface dialog, int which) {
FosdemApi.downloadSchedule(getContext());
GLTApi.downloadSchedule(getContext());
}
}).setNegativeButton(android.R.string.cancel, null)
......@@ -241,7 +242,7 @@ public class MainActivity extends AppCompatActivity implements NfcUtils.CreateNf
});
// Monitor the schedule download result
FosdemApi.getDownloadScheduleResult().observe(this, scheduleDownloadResultObserver);
GLTApi.getDownloadScheduleResult().observe(this, scheduleDownloadResultObserver);
// Setup drawer layout
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
......@@ -387,10 +388,6 @@ public class MainActivity extends AppCompatActivity implements NfcUtils.CreateNf
protected void onStart() {
super.onStart();
// Monitor the schedule download result
LocalBroadcastManager.getInstance(this).registerReceiver(scheduleDownloadResultReceiver,
new IntentFilter(GLTApi.ACTION_DOWNLOAD_SCHEDULE_RESULT));
// Download reminder
long now = System.currentTimeMillis();
Long timeValue = AppDatabase.getInstance(this).getScheduleDao().getLastUpdateTime().getValue();
......@@ -449,7 +446,7 @@ public class MainActivity extends AppCompatActivity implements NfcUtils.CreateNf
item.setIcon(icon);
((Animatable) icon).start();
}
FosdemApi.downloadSchedule(this);
GLTApi.downloadSchedule(this);
return true;
}
return false;
......@@ -474,7 +471,7 @@ public class MainActivity extends AppCompatActivity implements NfcUtils.CreateNf
.setToolbarColor(ContextCompat.getColor(this, R.color.color_primary))
.setShowTitle(true)
.build()
.launchUrl(this, Uri.parse(FosdemUrls.getVolunteer()));
.launchUrl(this, Uri.parse(GLTUrls.getVolunteer()));
} catch (ActivityNotFoundException ignore) {
}
break;
......
......@@ -61,7 +61,7 @@ public class RoomImageDialogActivity extends AppCompatActivity {
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
//TODO this was commented out
case R.id.navigation:
/*case R.id.navigation:
String localNavigationUrl = GLTUrls.getLocalNavigationToLocation(StringUtils.toSlug(roomName));
try {
new CustomTabsIntent.Builder()
......@@ -71,7 +71,7 @@ public class RoomImageDialogActivity extends AppCompatActivity {
.launchUrl(context, Uri.parse(localNavigationUrl));
} catch (ActivityNotFoundException ignore) {
}
break;
break;*/
//until here
}
return false;
......
......@@ -27,7 +27,7 @@ import at.linuxtage.companion.utils.ThemeUtils;
import at.linuxtage.companion.viewmodels.BookmarkStatusViewModel;
import at.linuxtage.companion.viewmodels.TrackScheduleEventViewModel;
import at.linuxtage.companion.widgets.BookmarkStatusAdapter;
import be.digitalia.fosdem.widgets.ContentLoadingProgressBar;
import at.linuxtage.companion.widgets.ContentLoadingProgressBar;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomappbar.BottomAppBar;
......
......@@ -26,7 +26,7 @@ import androidx.recyclerview.widget.ListAdapter;
import androidx.recyclerview.widget.RecyclerView;
import at.linuxtage.companion.R;
import at.linuxtage.companion.activities.EventDetailsActivity;
import at.linuxtage.companion.api.FosdemApi;
import at.linuxtage.companion.api.GLTApi;
import at.linuxtage.companion.model.Event;
import at.linuxtage.companion.model.RoomStatus;
import at.linuxtage.companion.model.Track;
......@@ -72,7 +72,7 @@ public class BookmarksAdapter extends ListAdapter<Event, BookmarksAdapter.ViewHo
multiChoiceHelper = new MultiChoiceHelper(activity, this);
multiChoiceHelper.setMultiChoiceModeListener(multiChoiceModeListener);
FosdemApi.getRoomStatuses(activity).observe(owner, this);
GLTApi.getRoomStatuses(activity).observe(owner, this);
}
@NonNull
......
package be.digitalia.companion.adapters;
package at.linuxtage.companion.adapters;
import android.util.SparseArray;
import android.view.ViewGroup;
......
......@@ -34,8 +34,6 @@ import at.linuxtage.companion.model.StatusEvent;
import at.linuxtage.companion.model.Track;
import at.linuxtage.companion.utils.DateUtils;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
......
package be.digitalia.companion.adapters;
package at.linuxtage.companion.adapters;
import androidx.annotation.NonNull;
import androidx.core.util.ObjectsCompat;
......
package be.digitalia.companion.adapters;
package at.linuxtage.companion.adapters;
import android.content.Context;
import android.content.res.TypedArray;
......@@ -20,10 +20,10 @@ import androidx.core.widget.TextViewCompat;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListAdapter;
import androidx.recyclerview.widget.RecyclerView;
import be.digitalia.companion.R;
import be.digitalia.companion.model.Event;
import be.digitalia.companion.model.StatusEvent;
import be.digitalia.companion.utils.DateUtils;
import at.linuxtage.companion.R;
import at.linuxtage.companion.model.Event;
import at.linuxtage.companion.model.StatusEvent;
import at.linuxtage.companion.utils.DateUtils;
import java.text.DateFormat;
import java.util.List;
......
......@@ -58,7 +58,7 @@ public class GLTApi {
try {
ScheduleDao scheduleDao = AppDatabase.getInstance(context).getScheduleDao();
HttpUtils.HttpResult httpResult = HttpUtils.get(
GLTUrls.getSchedule(),
GLTUrls.getSchedule(AppDatabase.getInstance(context).getYear()),
scheduleDao.getLastModifiedTag(),
new HttpUtils.ProgressUpdateListener() {
@Override
......
......@@ -10,9 +10,9 @@ import java.util.Locale;
*/
public class GLTUrls {
// https://fosdem.org/schedule/xml
//private static final String SCHEDULE_URL = "http://flo.cx/tmp/fosdem_d1.xml";
private static final String SCHEDULE_URL = "http://flo.cx/tmp/fosdem_d1.xml";
private static final String SCHEDULE_URL = "https://glt%1$d-programm.linuxtage.at/schedule.xml";
//private static final String SCHEDULE_URL = "https://glt%1$d-programm.linuxtage.at/schedule.xml";
//private static final String SCHEDULE_URL = "https://fosdem.org/schedule/xml";
private static final String ROOMS_URL = "https://api.fosdem.org/roomstatus/v1/listrooms";
//private static final String ROOMS_URL = "https://api.fosdem.org/roomstatus/v1/listrooms";
......@@ -24,7 +24,7 @@ public class GLTUrls {
private static final String LOCAL_NAVIGATION_URL = "https://nav.fosdem.org/";
private static final String LOCAL_NAVIGATION_TO_ROOM_URL_FORMAT = "https://nav.fosdem.org/d/%1$s/";
private static final String VOLUNTEER_URL = "https://linuxtage.at/helfer/";
private static final String VOLUNTEER_URL = "https://www.linuxtage.at/participate/";
//private static final String VOLUNTEER_URL = "https://fosdem.org/volunteer/";
......
package be.digitalia.companion.db;
package at.linuxtage.companion.db;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.DatabaseUtils;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import androidx.room.Database;
import androidx.room.Room;
......@@ -9,15 +14,16 @@ import androidx.room.RoomDatabase;
import androidx.room.TypeConverters;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;
import be.digitalia.companion.db.converters.GlobalTypeConverters;
import be.digitalia.companion.db.entities.Bookmark;
import be.digitalia.companion.db.entities.EventEntity;
import be.digitalia.companion.db.entities.EventTitles;
import be.digitalia.companion.db.entities.EventToPerson;
import be.digitalia.companion.model.Day;
import be.digitalia.companion.model.Link;
import be.digitalia.companion.model.Person;
import be.digitalia.companion.model.Track;
import at.linuxtage.companion.db.converters.GlobalTypeConverters;
import at.linuxtage.companion.db.entities.Bookmark;
import at.linuxtage.companion.db.entities.EventEntity;
import at.linuxtage.companion.db.entities.EventTitles;
import at.linuxtage.companion.db.entities.EventToPerson;
import at.linuxtage.companion.model.Day;
import at.linuxtage.companion.model.Link;
import at.linuxtage.companion.model.Person;
import at.linuxtage.companion.model.Track;
import at.linuxtage.companion.utils.DateUtils;
@Database(entities = {EventEntity.class, EventTitles.class, Person.class, EventToPerson.class, Link.class, Track.class, Day.class, Bookmark.class}, version = 2, exportSchema = false)
@TypeConverters({GlobalTypeConverters.class})
......@@ -25,6 +31,7 @@ public abstract class AppDatabase extends RoomDatabase {
private static final String DB_PREFS_FILE = "database";
private static volatile AppDatabase INSTANCE;
private int year = -1;
static final Migration MIGRATION_1_2 = new Migration(1, 2) {
@Override
......@@ -93,6 +100,32 @@ public abstract class AppDatabase extends RoomDatabase {
return res;
}
public int getYear() {
// Try to get the cached value first
if (year != -1) {
return year;
}
Calendar cal = Calendar.getInstance(DateUtils.getAustriaTimeZone(), Locale.US);
/*
// Compute from cached days if available
List<Day> days = daysLiveData.getValue();
if (days != null) {
if (days.size() > 0) {
cal.setTime(days.get(0).getDate());
}
} else {
// Perform a quick DB query to retrieve the time of the first day
long date = DatabaseUtils.longForQuery(helper.getReadableDatabase(),
"SELECT date FROM " + DatabaseHelper.DAYS_TABLE_NAME + " ORDER BY _index ASC LIMIT 1", null);
cal.setTimeInMillis(date);
}
*/
// If the calendar has not been set at this point, it will simply return the current year
year = cal.get(Calendar.YEAR);
return year;
}
public abstract ScheduleDao getScheduleDao();
public abstract BookmarksDao getBookmarksDao();
......
package be.digitalia.companion.db;
package at.linuxtage.companion.db;
import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;
import androidx.lifecycle.LiveData;
import androidx.room.*;
import be.digitalia.companion.alarms.FosdemAlarmManager;
import be.digitalia.companion.db.entities.Bookmark;
import be.digitalia.companion.model.AlarmInfo;
import be.digitalia.companion.model.Event;
import at.linuxtage.companion.alarms.FosdemAlarmManager;
import at.linuxtage.companion.db.entities.Bookmark;
import at.linuxtage.companion.model.AlarmInfo;
import at.linuxtage.companion.model.Event;
import java.util.List;
......
package be.digitalia.companion.db;
package at.linuxtage.companion.db;
import android.app.SearchManager;
import android.database.Cursor;
......@@ -10,12 +10,12 @@ import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.paging.DataSource;
import androidx.room.*;
import be.digitalia.companion.alarms.FosdemAlarmManager;
import be.digitalia.companion.db.entities.EventEntity;
import be.digitalia.companion.db.entities.EventTitles;
import be.digitalia.companion.db.entities.EventToPerson;
import be.digitalia.companion.model.*;
import be.digitalia.companion.utils.DateUtils;
import at.linuxtage.companion.alarms.FosdemAlarmManager;
import at.linuxtage.companion.db.entities.EventEntity;
import at.linuxtage.companion.db.entities.EventTitles;
import at.linuxtage.companion.db.entities.EventToPerson;
import at.linuxtage.companion.model.*;
import at.linuxtage.companion.utils.DateUtils;
import java.util.*;
......
package be.digitalia.companion.db.converters;
package at.linuxtage.companion.db.converters;
import androidx.room.TypeConverter;
import be.digitalia.companion.model.Day;
import be.digitalia.companion.model.Event;
import be.digitalia.companion.model.Person;
import be.digitalia.companion.model.Track;
import at.linuxtage.companion.model.Day;
import at.linuxtage.companion.model.Event;
import at.linuxtage.companion.model.Person;
import at.linuxtage.companion.model.Track;
public class GlobalTypeConverters {
@TypeConverter
......
package be.digitalia.companion.db.converters;
package at.linuxtage.companion.db.converters;
import java.util.Date;
......
package be.digitalia.companion.db.converters;
package at.linuxtage.companion.db.converters;
import java.util.Date;
......
package be.digitalia.companion.db.entities;
package at.linuxtage.companion.db.entities;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
......
package be.digitalia.companion.db.entities;
package at.linuxtage.companion.db.entities;
import java.util.Date;
......@@ -7,8 +7,8 @@ import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;
import be.digitalia.companion.db.converters.NullableDateTypeConverters;
import be.digitalia.companion.model.Event;
import at.linuxtage.companion.db.converters.NullableDateTypeConverters;
import at.linuxtage.companion.model.Event;
@Entity(tableName = EventEntity.TABLE_NAME, indices = {
@Index(value = {"day_index"}, name = "event_day_index_idx"),
......
package be.digitalia.companion.db.entities;
package at.linuxtage.companion.db.entities;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Fts3;
import androidx.room.PrimaryKey;
import be.digitalia.companion.model.Event;
import at.linuxtage.companion.model.Event;
@Fts3
@Entity(tableName = EventTitles.TABLE_NAME)
......
package be.digitalia.companion.db.entities;
package at.linuxtage.companion.db.entities;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
......
......@@ -21,6 +21,7 @@ import androidx.lifecycle.ViewModelProviders;
import at.linuxtage.companion.R;
import at.linuxtage.companion.activities.PersonInfoActivity;
import at.linuxtage.companion.api.GLTApi;
import at.linuxtage.companion.db.AppDatabase;
import at.linuxtage.companion.model.*;
import at.linuxtage.companion.utils.ClickableArrowKeyMovementMethod;
import at.linuxtage.companion.utils.DateUtils;
......@@ -29,8 +30,10 @@ import at.linuxtage.companion.viewmodels.EventDetailsViewModel;
import com.google.android.material.snackbar.Snackbar;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
public class EventDetailsFragment extends Fragment {
......@@ -203,11 +206,14 @@ public class EventDetailsFragment extends Fragment {
}
private Intent getShareChooserIntent() {
Calendar cal = Calendar.getInstance(DateUtils.getAustriaTimeZone(), Locale.US);
int year = cal.get(Calendar.YEAR);
return ShareCompat.IntentBuilder.from(getActivity())
//TODO DB Manager
.setSubject(String.format("%1$s (GLT%2$d)", event.getTitle(), DatabaseManager.getInstance().getYear()-2000))
.setSubject(String.format("%1$s (GLT%2$d)", event.getTitle(), year-2000))
.setType("text/plain")
.setText(String.format("%1$s %2$s #GLT%3$d", event.getTitle(), event.getUrl(), DatabaseManager.getInstance().getYear()-2000))
.setText(String.format("%1$s %2$s #GLT%3$d", event.getTitle(), event.getUrl(), year-2000))
.setChooserTitle(R.string.share)
.createChooserIntent();
}
......
package be.digitalia.companion.fragments;
package at.linuxtage.companion.fragments;
import android.os.Bundle;
import androidx.annotation.NonNull;
......@@ -8,10 +8,10 @@ import androidx.paging.PagedList;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import be.digitalia.companion.R;
import be.digitalia.companion.adapters.EventsAdapter;
import be.digitalia.companion.model.StatusEvent;
import be.digitalia.companion.viewmodels.ExternalBookmarksViewModel;
import at.linuxtage.companion.R;
import at.linuxtage.companion.adapters.EventsAdapter;
import at.linuxtage.companion.model.StatusEvent;
import at.linuxtage.companion.viewmodels.ExternalBookmarksViewModel;
public class ExternalBookmarksListFragment extends RecyclerViewFragment implements Observer<PagedList<StatusEvent>> {
......
......@@ -18,11 +18,11 @@ import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
at.linuxtage.companion.R;
at.linuxtage.companion.activities.PersonInfoActivity;
at.linuxtage.companion.adapters.SimpleItemCallback;
at.linuxtage.companion.model.Person;
at.linuxtage.companion.viewmodels.PersonsViewModel;
import at.linuxtage.companion.R;
import at.linuxtage.companion.activities.PersonInfoActivity;
import at.linuxtage.companion.adapters.SimpleItemCallback;
import at.linuxtage.companion.model.Person;
import at.linuxtage.companion.viewmodels.PersonsViewModel;
public class PersonsListFragment extends RecyclerViewFragment implements Observer<PagedList<Person>> {
......
package be.digitalia.companion.fragments;
package at.linuxtage.companion.fragments;
import android.app.Dialog;
import android.os.Build;
......@@ -12,9 +12,9 @@ import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import be.digitalia.companion.BuildConfig;
import be.digitalia.companion.R;
import be.digitalia.companion.services.AlarmIntentService;
import at.linuxtage.companion.BuildConfig;
import at.linuxtage.companion.R;
import at.linuxtage.companion.services.AlarmIntentService;
public class SettingsFragment extends PreferenceFragmentCompat {
......
package be.digitalia.companion.livedata;
package at.linuxtage.companion.livedata;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
......
package be.digitalia.companion.livedata;
package at.linuxtage.companion.livedata;
import android.os.Handler;
import android.os.Looper;
......
package be.digitalia.companion.livedata;
package at.linuxtage.companion.livedata;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
......
package be.digitalia.companion.model;
package at.linuxtage.companion.model;
import androidx.room.ColumnInfo;
import androidx.room.TypeConverters;
import be.digitalia.companion.db.converters.NullableDateTypeConverters;
import at.linuxtage.companion.db.converters.NullableDateTypeConverters;
import java.util.Date;
......
package be.digitalia.companion.model;
package at.linuxtage.companion.model;
public class BookmarkStatus {
......
......@@ -6,8 +6,8 @@ import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;
import be.digitalia.fosdem.db.converters.NonNullDateTypeConverters;
import be.digitalia.fosdem.utils.DateUtils;
import at.linuxtage.companion.db.converters.NonNullDateTypeConverters;
import at.linuxtage.companion.utils.DateUtils;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
......@@ -19,7 +19,7 @@ public class Day implements Comparable<Day>, Parcelable {
public static final String TABLE_NAME = "days";
private static final DateFormat DAY_DATE_FORMAT = DateUtils.withAustriaTimeZone(new SimpleDateFormat("EEEE", Locale.getDefault()));
private static final DateFormat DAY_DATE_FORMAT = DateUtils.withAustrianTimeZone(new SimpleDateFormat("EEEE", Locale.getDefault()));
@PrimaryKey
private int index;
......
package be.digitalia.companion.model;
package at.linuxtage.companion.model;
import android.text.TextUtils;
......
package be.digitalia.companion.model;
package at.linuxtage.companion.model;
public class DownloadScheduleResult {
......
package at.linuxtage.companion.model;
import java.util.Date;
import java.util.List;
import android.os.Parcel;
import android.os.Parcelable;
......@@ -13,8 +12,6 @@ import at.linuxtage.companion.api.GLTUrls;