mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Automatiaclly turn on the Modifications Content provider
Is a hack, needs a proper fix at some time
This commit is contained in:
parent
53ffac92b2
commit
e6305dffc3
2 changed files with 8 additions and 0 deletions
|
|
@ -92,6 +92,9 @@ public class MultipleShareActivity
|
||||||
categoriesSequence.setContentProviderClient(client);
|
categoriesSequence.setContentProviderClient(client);
|
||||||
categoriesSequence.save();
|
categoriesSequence.save();
|
||||||
}
|
}
|
||||||
|
// FIXME: Make sure that the content provider is up
|
||||||
|
// This is the wrong place for it, but bleh - better than not having it turned on by default for people who don't go throughl ogin
|
||||||
|
ContentResolver.setSyncAutomatically(app.getCurrentAccount(), ModificationsContentProvider.AUTHORITY, true); // Enable sync by default!
|
||||||
EventLog.schema(CommonsApplication.EVENT_CATEGORIZATION_ATTEMPT)
|
EventLog.schema(CommonsApplication.EVENT_CATEGORIZATION_ATTEMPT)
|
||||||
.param("username", app.getCurrentAccount().name)
|
.param("username", app.getCurrentAccount().name)
|
||||||
.param("categories-count", categories.size())
|
.param("categories-count", categories.size())
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,11 @@ public class ShareActivity
|
||||||
categoriesSequence.queueModifier(new CategoryModifier(categories.toArray(new String[]{})));
|
categoriesSequence.queueModifier(new CategoryModifier(categories.toArray(new String[]{})));
|
||||||
categoriesSequence.setContentProviderClient(getContentResolver().acquireContentProviderClient(ModificationsContentProvider.AUTHORITY));
|
categoriesSequence.setContentProviderClient(getContentResolver().acquireContentProviderClient(ModificationsContentProvider.AUTHORITY));
|
||||||
categoriesSequence.save();
|
categoriesSequence.save();
|
||||||
|
|
||||||
|
// FIXME: Make sure that the content provider is up
|
||||||
|
// This is the wrong place for it, but bleh - better than not having it turned on by default for people who don't go throughl ogin
|
||||||
|
ContentResolver.setSyncAutomatically(app.getCurrentAccount(), ModificationsContentProvider.AUTHORITY, true); // Enable sync by default!
|
||||||
|
|
||||||
EventLog.schema(CommonsApplication.EVENT_CATEGORIZATION_ATTEMPT)
|
EventLog.schema(CommonsApplication.EVENT_CATEGORIZATION_ATTEMPT)
|
||||||
.param("username", app.getCurrentAccount().name)
|
.param("username", app.getCurrentAccount().name)
|
||||||
.param("categories-count", categories.size())
|
.param("categories-count", categories.size())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue