Skip to content

Commit

Permalink
rename participate -> community
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky committed Sep 4, 2019
1 parent e8d585e commit 7fae762
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 96 deletions.
6 changes: 6 additions & 0 deletions drawable_resources/nav_community.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion drawable_resources/nav_participate.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<activity android:name=".ui.activity.ManageAccountsActivity" />
<activity android:name=".ui.activity.UserInfoActivity" />
<activity android:name=".ui.activity.NotificationsActivity"/>
<activity android:name=".ui.activity.ParticipateActivity" />
<activity android:name=".ui.activity.CommunityActivity" />
<activity android:name=".ui.activities.ActivitiesActivity"
android:configChanges="orientation|screenSize|keyboardHidden" />
<activity android:name=".ui.activity.SyncedFoldersActivity"/>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/nextcloud/client/di/ComponentsModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.owncloud.android.services.OperationsService;
import com.owncloud.android.ui.activities.ActivitiesActivity;
import com.owncloud.android.ui.activity.BaseActivity;
import com.owncloud.android.ui.activity.CommunityActivity;
import com.owncloud.android.ui.activity.ConflictsResolveActivity;
import com.owncloud.android.ui.activity.ContactsPreferenceActivity;
import com.owncloud.android.ui.activity.CopyToClipboardActivity;
Expand All @@ -49,7 +50,6 @@
import com.owncloud.android.ui.activity.ManageAccountsActivity;
import com.owncloud.android.ui.activity.ManageSpaceActivity;
import com.owncloud.android.ui.activity.NotificationsActivity;
import com.owncloud.android.ui.activity.ParticipateActivity;
import com.owncloud.android.ui.activity.PassCodeActivity;
import com.owncloud.android.ui.activity.ReceiveExternalFilesActivity;
import com.owncloud.android.ui.activity.RequestCredentialsActivity;
Expand Down Expand Up @@ -107,7 +107,9 @@ abstract class ComponentsModule {
@ContributesAndroidInjector abstract ManageAccountsActivity manageAccountsActivity();
@ContributesAndroidInjector abstract ManageSpaceActivity manageSpaceActivity();
@ContributesAndroidInjector abstract NotificationsActivity notificationsActivity();
@ContributesAndroidInjector abstract ParticipateActivity participateActivity();

@ContributesAndroidInjector
abstract CommunityActivity participateActivity();
@ContributesAndroidInjector abstract PassCodeActivity passCodeActivity();
@ContributesAndroidInjector abstract PreviewImageActivity previewImageActivity();
@ContributesAndroidInjector abstract PreviewVideoActivity previewVideoActivity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,62 +38,62 @@
/**
* Activity providing information about ways to participate in the app's development.
*/
public class ParticipateActivity extends FileActivity {
public class CommunityActivity extends FileActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.participate_layout);
setContentView(R.layout.community_layout);

// setup toolbar
setupToolbar();

// setup drawer
setupDrawer(R.id.nav_participate);
setupDrawer(R.id.nav_community);

ThemeUtils.setColoredTitle(getSupportActionBar(), R.string.drawer_participate, this);
ThemeUtils.setColoredTitle(getSupportActionBar(), R.string.drawer_community, this);

setupContent();
}

private void setupContent() {
TextView rcView = findViewById(R.id.participate_release_candidate_text);
TextView rcView = findViewById(R.id.community_release_candidate_text);
rcView.setMovementMethod(LinkMovementMethod.getInstance());

TextView contributeIrcView = findViewById(R.id.participate_contribute_irc_text);
TextView contributeIrcView = findViewById(R.id.community_contribute_irc_text);
contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
contributeIrcView.setText(Html.fromHtml(getString(R.string.participate_contribute_irc_text) + " " +
getString(R.string.participate_contribute_irc_text_link,
contributeIrcView.setText(Html.fromHtml(getString(R.string.community_contribute_irc_text) + " " +
getString(R.string.community_contribute_irc_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.irc_weblink))));

TextView contributeForumView = findViewById(R.id.participate_contribute_forum_text);
TextView contributeForumView = findViewById(R.id.community_contribute_forum_text);
contributeForumView.setMovementMethod(LinkMovementMethod.getInstance());
contributeForumView.setText(Html.fromHtml(getString(R.string.participate_contribute_forum_text) + " " +
getString(R.string.participate_contribute_forum_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.help_link), getString(R.string.participate_contribute_forum_forum))));
contributeForumView.setText(Html.fromHtml(getString(R.string.community_contribute_forum_text) + " " +
getString(R.string.community_contribute_forum_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.help_link), getString(R.string.community_contribute_forum_forum))));

TextView contributeTranslationView = findViewById(R.id.participate_contribute_translate_text);
TextView contributeTranslationView = findViewById(R.id.community_contribute_translate_text);
contributeTranslationView.setMovementMethod(LinkMovementMethod.getInstance());
contributeTranslationView.setText(Html.fromHtml(
getString(R.string.participate_contribute_translate_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.translation_link),
getString(R.string.participate_contribute_translate_translate)) + " " +
getString(R.string.participate_contribute_translate_text)));
getString(R.string.community_contribute_translate_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.translation_link),
getString(R.string.community_contribute_translate_translate)) + " " +
getString(R.string.community_contribute_translate_text)));

TextView contributeGithubView = findViewById(R.id.participate_contribute_github_text);
TextView contributeGithubView = findViewById(R.id.community_contribute_github_text);
contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
contributeGithubView.setText(Html.fromHtml(
getString(R.string.participate_contribute_github_text,
getString(R.string.participate_contribute_github_text_link,
getString(R.string.community_contribute_github_text,
getString(R.string.community_contribute_github_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.contributing_link)))));

MaterialButton reportButton = findViewById(R.id.participate_testing_report);
reportButton.getBackground().setColorFilter(ThemeUtils.primaryColor(this), PorterDuff.Mode.SRC_ATOP);
MaterialButton reportButton = findViewById(R.id.community_testing_report);
reportButton.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP);
reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link));
}

Expand Down Expand Up @@ -146,6 +146,6 @@ public void showFiles(boolean onDeviceOnly) {
protected void onResume() {
super.onResume();

setDrawerMenuItemChecked(R.id.nav_participate);
setDrawerMenuItemChecked(R.id.nav_community);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ private void filterDrawerMenu(Menu menu, Account account) {

DrawerMenuUtil.setupHomeMenuItem(menu, getResources());

DrawerMenuUtil.removeMenuItem(menu, R.id.nav_participate,
!getResources().getBoolean(R.bool.participate_enabled));
DrawerMenuUtil.removeMenuItem(menu, R.id.nav_community,
!getResources().getBoolean(R.bool.participate_enabled));
DrawerMenuUtil.removeMenuItem(menu, R.id.nav_shared, !getResources().getBoolean(R.bool.shared_enabled));
DrawerMenuUtil.removeMenuItem(menu, R.id.nav_contacts, !getResources().getBoolean(R.bool.contacts_backup)
|| !getResources().getBoolean(R.bool.show_drawer_contacts_backup));
Expand Down Expand Up @@ -457,8 +457,8 @@ private void selectNavigationItem(final MenuItem menuItem) {
case R.id.nav_settings:
startActivity(SettingsActivity.class);
break;
case R.id.nav_participate:
startActivity(ParticipateActivity.class);
case R.id.nav_community:
startActivity(CommunityActivity.class);
break;
case R.id.nav_logout:
mCheckedMenuItem = -1;
Expand Down
File renamed without changes.
Loading

0 comments on commit 7fae762

Please sign in to comment.