├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── android
├── src
│ ├── main
│ │ ├── assets
│ │ │ ├── Roboto-Light.ttf
│ │ │ └── Roboto-Thin.ttf
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── ic_add.png
│ │ │ │ ├── ic_edit.png
│ │ │ │ ├── ic_check.png
│ │ │ │ ├── ic_clear.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_drawer.png
│ │ │ │ ├── ic_people.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_add_light.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_menu_cc.png
│ │ │ │ ├── ic_settings.png
│ │ │ │ ├── ic_check_light.png
│ │ │ │ ├── ic_clear_light.png
│ │ │ │ ├── ic_edit_light.png
│ │ │ │ ├── ic_expand_less.png
│ │ │ │ ├── ic_expand_more.png
│ │ │ │ ├── ic_delete_light.png
│ │ │ │ ├── ic_notification.png
│ │ │ │ ├── ic_people_light.png
│ │ │ │ ├── ic_refresh_light.png
│ │ │ │ ├── ic_settings_light.png
│ │ │ │ ├── ic_expand_less_light.png
│ │ │ │ ├── ic_expand_more_light.png
│ │ │ │ ├── ic_notification_small.png
│ │ │ │ └── ic_refresh_action_wear.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── ic_add.png
│ │ │ │ ├── ic_edit.png
│ │ │ │ ├── ic_check.png
│ │ │ │ ├── ic_clear.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_drawer.png
│ │ │ │ ├── ic_people.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_add_light.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_menu_cc.png
│ │ │ │ ├── ic_settings.png
│ │ │ │ ├── ic_check_light.png
│ │ │ │ ├── ic_clear_light.png
│ │ │ │ ├── ic_edit_light.png
│ │ │ │ ├── ic_expand_less.png
│ │ │ │ ├── ic_expand_more.png
│ │ │ │ ├── ic_delete_light.png
│ │ │ │ ├── ic_notification.png
│ │ │ │ ├── ic_people_light.png
│ │ │ │ ├── ic_refresh_light.png
│ │ │ │ ├── ic_settings_light.png
│ │ │ │ ├── ic_expand_less_light.png
│ │ │ │ ├── ic_expand_more_light.png
│ │ │ │ ├── ic_notification_small.png
│ │ │ │ └── ic_refresh_action_wear.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── ic_add.png
│ │ │ │ ├── ic_check.png
│ │ │ │ ├── ic_clear.png
│ │ │ │ ├── ic_edit.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_drawer.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_people.png
│ │ │ │ ├── ic_settings.png
│ │ │ │ ├── ic_add_light.png
│ │ │ │ ├── ic_edit_light.png
│ │ │ │ ├── ic_check_light.png
│ │ │ │ ├── ic_clear_light.png
│ │ │ │ ├── ic_delete_light.png
│ │ │ │ ├── ic_expand_less.png
│ │ │ │ ├── ic_expand_more.png
│ │ │ │ ├── ic_notification.png
│ │ │ │ ├── ic_people_light.png
│ │ │ │ ├── ic_refresh_light.png
│ │ │ │ ├── item_activated.9.png
│ │ │ │ ├── item_checked.9.png
│ │ │ │ ├── item_focused.9.png
│ │ │ │ ├── item_pressed.9.png
│ │ │ │ ├── ic_settings_light.png
│ │ │ │ ├── ic_expand_less_light.png
│ │ │ │ ├── ic_expand_more_light.png
│ │ │ │ ├── ic_notification_small.png
│ │ │ │ ├── ic_action_overflow_dark.png
│ │ │ │ ├── ic_refresh_action_wear.png
│ │ │ │ └── ic_action_overflow_light.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── ic_add.png
│ │ │ │ ├── ic_edit.png
│ │ │ │ ├── ic_check.png
│ │ │ │ ├── ic_clear.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_people.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_add_light.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_settings.png
│ │ │ │ ├── ic_check_light.png
│ │ │ │ ├── ic_clear_light.png
│ │ │ │ ├── ic_delete_light.png
│ │ │ │ ├── ic_edit_light.png
│ │ │ │ ├── ic_expand_less.png
│ │ │ │ ├── ic_expand_more.png
│ │ │ │ ├── ic_notification.png
│ │ │ │ ├── ic_people_light.png
│ │ │ │ ├── ic_refresh_light.png
│ │ │ │ ├── ic_settings_light.png
│ │ │ │ ├── ic_expand_less_light.png
│ │ │ │ ├── ic_expand_more_light.png
│ │ │ │ ├── ic_notification_small.png
│ │ │ │ └── ic_refresh_action_wear.png
│ │ │ ├── values
│ │ │ │ ├── bools.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── attrs.xml
│ │ │ │ └── plurals.xml
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_notification.png
│ │ │ │ └── ic_refresh_action_wear.png
│ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ ├── layout
│ │ │ │ ├── prompt_dialog.xml
│ │ │ │ ├── default_list_view.xml
│ │ │ │ ├── dcc_file_fragment.xml
│ │ │ │ ├── user_list_fragment.xml
│ │ │ │ ├── logging_action_bar.xml
│ │ │ │ ├── must_be_complete_textview.xml
│ │ │ │ ├── default_listview_textview.xml
│ │ │ │ ├── tab_layout.xml
│ │ │ │ ├── action_recycler_item.xml
│ │ │ │ ├── sliding_menu_header.xml
│ │ │ │ ├── toast_mention.xml
│ │ │ │ ├── preference_number_picker.xml
│ │ │ │ ├── dcc_file_list_item.xml
│ │ │ │ ├── actionbar_custom_view_done.xml
│ │ │ │ ├── actionbar_custom_view_done_cancel.xml
│ │ │ │ ├── invites_fragment.xml
│ │ │ │ ├── include_done_button.xml
│ │ │ │ ├── include_cancel_button.xml
│ │ │ │ ├── main_list_child.xml
│ │ │ │ ├── ignore_list_item.xml
│ │ │ │ ├── dcc_pending_fragment.xml
│ │ │ │ ├── irc_listview_textview.xml
│ │ │ │ ├── navigation_drawer_layout.xml
│ │ │ │ ├── expandable_list_fragment.xml
│ │ │ │ ├── ignored_users_fragment.xml
│ │ │ │ ├── invite_list_item.xml
│ │ │ │ ├── fragment_irc.xml
│ │ │ │ ├── main_list_group.xml
│ │ │ │ ├── fragment_channel.xml
│ │ │ │ ├── main_activity.xml
│ │ │ │ ├── nick_choices_edit_texts.xml
│ │ │ │ └── dcc_pending_list_item.xml
│ │ │ ├── drawable
│ │ │ │ ├── autocomplete_selector.xml
│ │ │ │ ├── child_background.xml
│ │ │ │ ├── group_background.xml
│ │ │ │ ├── overflow_selector.xml
│ │ │ │ ├── background_holo_dark.xml
│ │ │ │ ├── background_holo_light.xml
│ │ │ │ ├── shadow.xml
│ │ │ │ ├── activatable_item_background.xml
│ │ │ │ └── activatable_selector_light.xml
│ │ │ ├── menu
│ │ │ │ ├── fragment_invite_cab.xml
│ │ │ │ ├── fragment_ignore_cab.xml
│ │ │ │ ├── fragment_logging_ab.xml
│ │ │ │ ├── fragment_navigation_drawer_ab.xml
│ │ │ │ ├── activity_server_channel_ab.xml
│ │ │ │ ├── activity_server_settings_channellist_ab.xml
│ │ │ │ ├── activty_server_settings_cab.xml
│ │ │ │ ├── activity_server_list_popup.xml
│ │ │ │ ├── activity_main_ab.xml
│ │ │ │ └── fragment_userlist_cab.xml
│ │ │ ├── anim
│ │ │ │ ├── action_bar_in.xml
│ │ │ │ ├── action_bar_out.xml
│ │ │ │ ├── slide_in_left.xml
│ │ │ │ ├── slide_in_right.xml
│ │ │ │ ├── slide_out_left.xml
│ │ │ │ └── slide_out_right.xml
│ │ │ ├── xml
│ │ │ │ ├── about_settings_fragment.xml
│ │ │ │ ├── logging_settings.xml
│ │ │ │ ├── default_user_fragment.xml
│ │ │ │ ├── bug_reporting_preference_fragment.xml
│ │ │ │ ├── app_settings_headers.xml
│ │ │ │ ├── app_settings_headers_legacy.xml
│ │ │ │ ├── notification_settings.xml
│ │ │ │ ├── appearance_settings_fragment.xml
│ │ │ │ └── server_channel_settings_fragment.xml
│ │ │ └── values-sw600dp-land
│ │ │ │ └── dimens.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── fusionx
│ │ │ │ └── lightirc
│ │ │ │ ├── event
│ │ │ │ ├── OnPreferencesChangedEvent.java
│ │ │ │ ├── ServerStopRequestedEvent.java
│ │ │ │ ├── OnCurrentServerStatusChanged.java
│ │ │ │ ├── OnDCCChatEvent.java
│ │ │ │ ├── OnServerStatusChanged.java
│ │ │ │ ├── OnQueryEvent.java
│ │ │ │ ├── OnServiceConnectionStateChanged.java
│ │ │ │ ├── OnConversationChanged.java
│ │ │ │ └── OnChannelMentionEvent.java
│ │ │ │ ├── model
│ │ │ │ ├── MessagePriority.java
│ │ │ │ ├── EventDecorator.java
│ │ │ │ ├── NickColour.java
│ │ │ │ └── ServerConversationContainer.java
│ │ │ │ ├── util
│ │ │ │ ├── CompatUtils.java
│ │ │ │ ├── PreferenceUtils.java
│ │ │ │ ├── FragmentUtils.java
│ │ │ │ ├── DatabaseUtils.java
│ │ │ │ ├── BuilderUtils.java
│ │ │ │ └── MiscUtils.java
│ │ │ │ ├── misc
│ │ │ │ ├── Theme.java
│ │ │ │ ├── FragmentType.java
│ │ │ │ ├── NickCache.java
│ │ │ │ ├── FormattedString.java
│ │ │ │ └── EventCache.java
│ │ │ │ ├── IRCApplication.java
│ │ │ │ ├── interfaces
│ │ │ │ └── ServerSettingsCallbacks.java
│ │ │ │ ├── ui
│ │ │ │ ├── BaseIRCFragment.java
│ │ │ │ ├── DefaultUserPreferenceFragment.java
│ │ │ │ ├── preferences
│ │ │ │ │ ├── SummaryEditTextPreference.java
│ │ │ │ │ ├── SaslUsernameEditTextPreference.java
│ │ │ │ │ ├── PasswordSummaryEditTextPreference.java
│ │ │ │ │ ├── DefaultNickPreference.java
│ │ │ │ │ ├── ViewPreference.java
│ │ │ │ │ ├── NickPreference.java
│ │ │ │ │ ├── ServerTitleEditTextPreference.java
│ │ │ │ │ └── NonEmptyEditTextPreference.java
│ │ │ │ ├── SettingsActivity.java
│ │ │ │ ├── ChannelListActivity.java
│ │ │ │ ├── BugReportingPreferenceFragment.java
│ │ │ │ ├── dialogbuilder
│ │ │ │ │ └── NickDialogBuilder.java
│ │ │ │ ├── helper
│ │ │ │ │ └── RestartAppPreferenceListener.java
│ │ │ │ ├── ServerPreferenceFragment.java
│ │ │ │ ├── NotificationPreferenceFragment.java
│ │ │ │ ├── DCCChatFragment.java
│ │ │ │ ├── ServerChannelPreferenceFragment.java
│ │ │ │ ├── UserFragment.java
│ │ │ │ ├── AboutPreferenceFragment.java
│ │ │ │ ├── ServerFragment.java
│ │ │ │ ├── AppearancePreferenceFragment.java
│ │ │ │ ├── SlidingPaneToggleArrow.java
│ │ │ │ ├── LoggingPreferenceFragment.java
│ │ │ │ └── IgnoredUsersAdapter.java
│ │ │ │ ├── logging
│ │ │ │ └── IRCLoggingManager.java
│ │ │ │ ├── loader
│ │ │ │ ├── AbstractLoader.java
│ │ │ │ └── ServerWrapperLoader.java
│ │ │ │ └── view
│ │ │ │ └── ProgrammableSlidingPaneLayout.java
│ │ └── AndroidManifest.xml
│ ├── simple
│ │ └── java
│ │ │ └── com
│ │ │ └── fusionx
│ │ │ └── lightirc
│ │ │ └── util
│ │ │ └── CrashUtils.java
│ └── internal
│ │ └── java
│ │ └── com
│ │ └── fusionx
│ │ └── lightirc
│ │ └── util
│ │ └── CrashUtils.java
└── proguard-rules.pro
├── settings.gradle
├── .gitignore
├── .travis.yml
├── gradlew.bat
└── README.mkdn
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/src/main/assets/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/assets/Roboto-Light.ttf
--------------------------------------------------------------------------------
/android/src/main/assets/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/assets/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_add.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_edit.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_add.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_edit.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_add.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_check.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_clear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_delete.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_drawer.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_people.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_reply.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_check.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_clear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_delete.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_drawer.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_people.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_reply.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_check.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_clear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_edit.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_reply.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_add.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_edit.png
--------------------------------------------------------------------------------
/android/src/main/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_add_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_add_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_menu_cc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_menu_cc.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_settings.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_add_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_add_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_menu_cc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_menu_cc.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_settings.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_delete.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_people.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_settings.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_check.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_clear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_people.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_people.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_reply.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxxhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxxhdpi/ic_reply.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_check_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_check_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_clear_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_clear_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_edit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_edit_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_expand_less.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_expand_less.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_expand_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_expand_more.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_check_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_check_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_clear_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_clear_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_edit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_edit_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_expand_less.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_expand_less.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_expand_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_expand_more.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_add_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_add_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_edit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_edit_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_add_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_add_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_delete_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_delete_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_notification.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_people_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_people_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_refresh_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_refresh_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_settings_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_settings_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_delete_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_delete_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_notification.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_people_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_people_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_refresh_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_refresh_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_settings_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_settings_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_check_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_check_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_clear_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_clear_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_delete_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_delete_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_expand_less.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_expand_less.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_expand_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_expand_more.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_notification.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_people_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_people_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_refresh_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_refresh_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/item_activated.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/item_activated.9.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/item_checked.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/item_checked.9.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/item_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/item_focused.9.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/item_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/item_pressed.9.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_check_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_check_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_clear_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_clear_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_delete_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_delete_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_edit_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_edit_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_expand_less.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_expand_less.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_expand_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_expand_more.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_notification.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_people_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_people_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_settings_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_settings_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_refresh_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_refresh_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_settings_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_settings_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxxhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxxhdpi/ic_notification.png
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnPreferencesChangedEvent.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | public class OnPreferencesChangedEvent {
4 |
5 | }
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_expand_less_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_expand_less_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_expand_more_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_expand_more_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_notification_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_notification_small.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-hdpi/ic_refresh_action_wear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-hdpi/ic_refresh_action_wear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_expand_less_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_expand_less_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_expand_more_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_expand_more_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_notification_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_notification_small.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-mdpi/ic_refresh_action_wear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-mdpi/ic_refresh_action_wear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_expand_less_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_expand_less_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_expand_more_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_expand_more_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_notification_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_notification_small.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_expand_less_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_expand_less_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_expand_more_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_expand_more_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_action_overflow_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_action_overflow_dark.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_refresh_action_wear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_refresh_action_wear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_notification_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_notification_small.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxhdpi/ic_refresh_action_wear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxhdpi/ic_refresh_action_wear.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xhdpi/ic_action_overflow_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xhdpi/ic_action_overflow_light.png
--------------------------------------------------------------------------------
/android/src/main/res/drawable-xxxhdpi/ic_refresh_action_wear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LalitMaganti/HoloIRC/HEAD/android/src/main/res/drawable-xxxhdpi/ic_refresh_action_wear.png
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/model/MessagePriority.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.model;
2 |
3 | public enum MessagePriority {
4 | LOW,
5 | MEDIUM,
6 | HIGH
7 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':android', ':bus-library', ':relay-library'
2 |
3 | project(':bus-library').projectDir = new File('libraries/bus/library')
4 | project(':relay-library').projectDir = new File('libraries/relay/library')
--------------------------------------------------------------------------------
/android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Jan 01 14:35:42 CET 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-bin.zip
7 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/prompt_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/CompatUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import android.os.Build;
4 |
5 | public class CompatUtils {
6 |
7 | public static boolean hasKitKat() {
8 | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
9 | }
10 | }
--------------------------------------------------------------------------------
/android/src/main/res/drawable/autocomplete_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/ServerStopRequestedEvent.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.base.Server;
4 |
5 | public class ServerStopRequestedEvent {
6 |
7 | public final Server server;
8 |
9 | public ServerStopRequestedEvent(final Server server) {
10 | this.server = server;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/model/EventDecorator.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.model;
2 |
3 | public class EventDecorator {
4 |
5 | private final CharSequence mMessage;
6 |
7 | public EventDecorator(final CharSequence message) {
8 | mMessage = message;
9 | }
10 |
11 | public CharSequence getMessage() {
12 | return mMessage;
13 | }
14 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnCurrentServerStatusChanged.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.base.ConnectionStatus;
4 |
5 | public class OnCurrentServerStatusChanged {
6 |
7 | public final ConnectionStatus status;
8 |
9 | public OnCurrentServerStatusChanged(ConnectionStatus status) {
10 | this.status = status;
11 | }
12 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/misc/Theme.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.misc;
2 |
3 | public enum Theme {
4 | LIGHT(100),
5 | DARK(350);
6 |
7 | private final int mTextColourOffset;
8 |
9 | private Theme(final int i) {
10 | mTextColourOffset = i;
11 | }
12 |
13 | public int getTextColourOffset() {
14 | return mTextColourOffset;
15 | }
16 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/IRCApplication.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc;
2 |
3 | import android.app.Application;
4 |
5 | import com.fusionx.lightirc.misc.AppPreferences;
6 |
7 | public class IRCApplication extends Application {
8 | @Override
9 | public void onCreate() {
10 | super.onCreate();
11 | AppPreferences.setupAppPreferences(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnDCCChatEvent.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.dcc.chat.DCCChatConversation;
4 |
5 | public class OnDCCChatEvent {
6 |
7 | public final DCCChatConversation chatConversation;
8 |
9 | public OnDCCChatEvent(final DCCChatConversation chatConversation) {
10 | this.chatConversation = chatConversation;
11 | }
12 | }
--------------------------------------------------------------------------------
/android/src/main/res/menu/fragment_invite_cab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/default_list_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/action_bar_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/action_bar_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
11 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/android/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/fragment_ignore_cab.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/interfaces/ServerSettingsCallbacks.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.interfaces;
2 |
3 | import android.app.Activity;
4 | import android.preference.Preference;
5 | import android.preference.PreferenceScreen;
6 |
7 | public interface ServerSettingsCallbacks {
8 |
9 | public void setupPreferences(final PreferenceScreen screen, final Activity activity);
10 |
11 | public boolean onPreferenceChange(final Preference preference);
12 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnServerStatusChanged.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.base.ConnectionStatus;
4 | import co.fusionx.relay.base.Server;
5 |
6 | public class OnServerStatusChanged {
7 | public final Server server;
8 | public final ConnectionStatus status;
9 |
10 | public OnServerStatusChanged(Server server, ConnectionStatus status) {
11 | this.server = server;
12 | this.status = status;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/fragment_logging_ab.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/dcc_file_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/user_list_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/BaseIRCFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.misc.FragmentType;
4 |
5 | import android.support.v4.app.Fragment;
6 |
7 | import co.fusionx.relay.base.Conversation;
8 | import co.fusionx.relay.event.Event;
9 |
10 | public abstract class BaseIRCFragment extends Fragment {
11 |
12 | public abstract FragmentType getType();
13 |
14 | public abstract boolean isValid();
15 |
16 | public abstract Conversation getConversation();
17 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/DefaultUserPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 |
5 | import android.os.Bundle;
6 | import android.preference.PreferenceFragment;
7 |
8 | public class DefaultUserPreferenceFragment extends PreferenceFragment {
9 |
10 | @Override
11 | public void onCreate(final Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | addPreferencesFromResource(R.xml.default_user_fragment);
14 | }
15 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnQueryEvent.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.base.QueryUser;
4 |
5 | public class OnQueryEvent {
6 |
7 | public final QueryUser queryUser;
8 | public final String message;
9 | public final long timestamp;
10 |
11 | public OnQueryEvent(final QueryUser queryUser, final String message, final long timestamp) {
12 | this.queryUser = queryUser;
13 | this.message = message;
14 | this.timestamp = timestamp;
15 | }
16 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnServiceConnectionStateChanged.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import com.fusionx.lightirc.service.IRCService;
4 |
5 | import java.lang.ref.WeakReference;
6 |
7 | public class OnServiceConnectionStateChanged {
8 | private final WeakReference mService;
9 |
10 | public OnServiceConnectionStateChanged(IRCService service) {
11 | mService = new WeakReference<>(service);
12 | }
13 |
14 | public IRCService getService() {
15 | return mService.get();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/fragment_navigation_drawer_ab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/child_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/group_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnConversationChanged.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import com.fusionx.lightirc.misc.FragmentType;
4 |
5 | import co.fusionx.relay.base.Conversation;
6 |
7 | public class OnConversationChanged {
8 |
9 | public final Conversation conversation;
10 |
11 | public final FragmentType fragmentType;
12 |
13 | public OnConversationChanged(final Conversation conversation, final FragmentType fragmentType) {
14 | this.conversation = conversation;
15 | this.fragmentType = fragmentType;
16 | }
17 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/logging_action_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/must_be_complete_textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/SummaryEditTextPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import android.content.Context;
4 | import android.preference.EditTextPreference;
5 | import android.util.AttributeSet;
6 |
7 | public class SummaryEditTextPreference extends EditTextPreference {
8 |
9 | public SummaryEditTextPreference(Context context, AttributeSet attrs) {
10 | super(context, attrs);
11 | }
12 |
13 | @Override
14 | public void setText(final String text) {
15 | super.setText(text);
16 |
17 | setSummary(text);
18 | }
19 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/default_listview_textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/tab_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/action_recycler_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/event/OnChannelMentionEvent.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.event;
2 |
3 | import co.fusionx.relay.base.Channel;
4 | import co.fusionx.relay.base.Nick;
5 |
6 | public class OnChannelMentionEvent {
7 |
8 | public final Channel channel;
9 | public final Nick user;
10 | public final String message;
11 | public final long timestamp;
12 |
13 | public OnChannelMentionEvent(final Channel channel, Nick user, String message, long timestamp) {
14 | this.channel = channel;
15 | this.user = user;
16 | this.message = message;
17 | this.timestamp = timestamp;
18 | }
19 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/sliding_menu_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | gen/
3 | .metadata
4 | tmp/**
5 | tmp/**/*
6 | *.tmp
7 | *.bak
8 | *.swp
9 | *~
10 | lint.xml
11 |
12 | .classpath
13 | .settings/
14 | .loadpath
15 | .gradle
16 |
17 | # Locally stored "Eclipse launch configurations"
18 | *.launch
19 |
20 | # Idea files
21 | .idea
22 | build
23 | *.iml
24 | out
25 |
26 | # built application files
27 | *.apk
28 | *.ap_
29 |
30 | # Java class files
31 | *.class
32 |
33 | local.properties
34 | project.properties
35 | # Contains release info
36 | signing.properties
37 | notes
38 |
39 | # Crashlytics
40 | fabric.properties
41 | crashlytics.properties
42 | crashlytics-build.properties
43 | com_crashlytics_export_strings.xml
44 |
45 | # Crowdin
46 | crowdin*
47 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/SaslUsernameEditTextPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 |
5 | import android.content.Context;
6 | import android.preference.EditTextPreference;
7 | import android.util.AttributeSet;
8 |
9 | public class SaslUsernameEditTextPreference extends EditTextPreference {
10 |
11 | public SaslUsernameEditTextPreference(Context context, AttributeSet attrs) {
12 | super(context, attrs);
13 | }
14 |
15 | @Override
16 | public void setText(final String text) {
17 | super.setText(text);
18 |
19 | setSummary(StringUtils.isEmpty(text) ? "SASL will be used if supported by the server" :
20 | text);
21 | }
22 | }
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | notifications:
2 | email: false
3 |
4 | branches:
5 | only:
6 | - develop
7 |
8 | language: android
9 |
10 | jdk: oraclejdk8
11 |
12 | android:
13 | components:
14 | - platform-tools
15 | - tools
16 | - build-tools-23.0.2
17 | - android-23
18 | - extra-android-m2repository
19 |
20 | env:
21 | - TERM=dumb
22 |
23 | before_install:
24 | - export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
25 | - export JAVA_HOME=/usr/lib/jvm/java-8-oracle
26 | - git clone https://github.com/tilal6991/Relay.git libraries/relay -b develop
27 | - git clone https://github.com/tilal6991/Bus.git libraries/bus -b develop
28 |
29 |
30 | script: ./gradlew assembleSimpleDebug && ./gradlew testSimpleDebug
31 | after_success:
32 | - ./gradlew jacocoTestReport coveralls
33 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.fusionx.lightirc.R;
6 | import com.fusionx.lightirc.util.UIUtils;
7 |
8 | import java.util.List;
9 |
10 | public class SettingsActivity extends SettingsActivityBase {
11 |
12 | @Override
13 | public void onCreate(Bundle savedInstanceState) {
14 | setTheme(UIUtils.getThemeInt());
15 | super.onCreate(savedInstanceState);
16 | }
17 |
18 | @Override
19 | public void onBuildHeaders(final List target) {
20 | loadHeadersFromResource(R.xml.app_settings_headers, target);
21 | }
22 |
23 | @Override
24 | protected boolean isValidFragment(final String fragmentName) {
25 | return true;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/about_settings_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/toast_mention.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
20 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/logging_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/android/src/simple/java/com/fusionx/lightirc/util/CrashUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import co.fusionx.relay.base.Server;
4 |
5 | import android.content.Context;
6 |
7 | public class CrashUtils {
8 |
9 | public static void startCrashlyticsIfAppropriate(final Context context) {
10 | // Don't do anything since we are building simple flavour
11 | }
12 |
13 | public static void logMissingData(final Server server) {
14 | // Don't do anything since we are building simple flavour
15 | }
16 |
17 | public static void logIssue(final String data) {
18 | // Don't do anything since we are building simple flavour
19 | }
20 |
21 | public static void handleException(Exception ex) {
22 | // Simply throw the exception to warn the user.
23 | throw new RuntimeException(ex);
24 | }
25 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/PreferenceUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import android.preference.Preference;
4 | import android.preference.PreferenceCategory;
5 | import android.preference.PreferenceGroup;
6 | import android.preference.PreferenceScreen;
7 |
8 | import java.util.List;
9 |
10 | public class PreferenceUtils {
11 |
12 | public static void getPreferenceList(final Preference p, final List list) {
13 | if (p instanceof PreferenceCategory || p instanceof PreferenceScreen) {
14 | final PreferenceGroup pGroup = (PreferenceGroup) p;
15 | int pCount = pGroup.getPreferenceCount();
16 | for (int i = 0; i < pCount; i++) {
17 | getPreferenceList(pGroup.getPreference(i), list);
18 | }
19 | } else {
20 | list.add(p);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/FragmentUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentActivity;
5 |
6 | public class FragmentUtils {
7 |
8 | // Casts are checked using runtime methods
9 | @SuppressWarnings("unchecked")
10 | public static T getParent(Fragment frag, Class callbackInterface) {
11 | final Fragment parentFragment = frag.getParentFragment();
12 | if (parentFragment != null && callbackInterface.isInstance(parentFragment)) {
13 | return (T) parentFragment;
14 | } else {
15 | final FragmentActivity activity = frag.getActivity();
16 | if (activity != null && callbackInterface.isInstance(activity)) {
17 | return (T) activity;
18 | }
19 | }
20 | return null;
21 | }
22 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/PasswordSummaryEditTextPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import com.fusionx.lightirc.R;
4 |
5 | import org.apache.commons.lang3.StringUtils;
6 |
7 | import android.content.Context;
8 | import android.preference.EditTextPreference;
9 | import android.util.AttributeSet;
10 |
11 | public class PasswordSummaryEditTextPreference extends EditTextPreference {
12 |
13 | public PasswordSummaryEditTextPreference(Context context, AttributeSet attrs) {
14 | super(context, attrs);
15 | }
16 |
17 | @Override
18 | public void setText(final String text) {
19 | super.setText(text);
20 |
21 | setSummary(StringUtils.isEmpty(text) ? getContext().getString(R.string
22 | .server_settings_no_password) : getContext().getString(R.string
23 | .server_settings_password_set));
24 | }
25 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/ChannelListActivity.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 |
6 | import com.fusionx.lightirc.util.UIUtils;
7 |
8 | public class ChannelListActivity extends AppCompatActivity {
9 |
10 | private ChannelListFragment mChannelListFragment;
11 |
12 | @Override
13 | public void onBackPressed() {
14 | mChannelListFragment.onSaveData();
15 |
16 | super.onBackPressed();
17 | }
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | setTheme(UIUtils.getThemeInt());
22 | super.onCreate(savedInstanceState);
23 |
24 | mChannelListFragment = new ChannelListFragment();
25 |
26 | getSupportFragmentManager().beginTransaction().replace(android.R.id.content,
27 | mChannelListFragment).commit();
28 | }
29 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/BugReportingPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 | import com.fusionx.lightirc.ui.helper.RestartAppPreferenceListener;
5 |
6 | import android.os.Bundle;
7 | import android.preference.Preference;
8 | import android.preference.PreferenceFragment;
9 |
10 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_BUG_REPORTING;
11 |
12 | public class BugReportingPreferenceFragment extends PreferenceFragment {
13 |
14 | @Override
15 | public void onCreate(final Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | addPreferencesFromResource(R.xml.bug_reporting_preference_fragment);
18 |
19 | final Preference preference = getPreferenceScreen().findPreference(PREF_BUG_REPORTING);
20 | preference.setOnPreferenceChangeListener(new RestartAppPreferenceListener(getActivity()));
21 | }
22 | }
--------------------------------------------------------------------------------
/android/src/main/res/drawable/overflow_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/preference_number_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
16 |
17 |
23 |
24 |
--------------------------------------------------------------------------------
/android/src/main/res/values-sw600dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | 800dp
24 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/background_holo_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
22 |
23 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/background_holo_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
22 |
23 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/logging/IRCLoggingManager.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.logging;
2 |
3 | import com.fusionx.lightirc.model.EventDecorator;
4 | import com.fusionx.lightirc.service.IRCService;
5 | import com.fusionx.lightirc.util.EventUtils;
6 |
7 | import co.fusionx.relay.base.Server;
8 | import co.fusionx.relay.event.Event;
9 | import co.fusionx.relay.logging.LoggingManager;
10 | import co.fusionx.relay.logging.LoggingPreferences;
11 |
12 | public class IRCLoggingManager extends LoggingManager {
13 |
14 | public IRCLoggingManager(final LoggingPreferences preferences) {
15 | super(preferences);
16 | }
17 |
18 | @Override
19 | public CharSequence getMessageFromEvent(final Server server, final Event event) {
20 | EventDecorator decorator = IRCService.getEventCache(server, false).get(event);
21 | return decorator.getMessage();
22 | }
23 |
24 | @Override
25 | protected boolean shouldLogEvent(final Event event) {
26 | return EventUtils.shouldStoreEvent(event);
27 | }
28 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/misc/FragmentType.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.misc;
23 |
24 | public enum FragmentType {
25 | SERVER,
26 | CHANNEL,
27 | USER,
28 | DCCCHAT,
29 | DCCFILE
30 | }
31 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/loader/AbstractLoader.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.loader;
2 |
3 | import android.content.Context;
4 | import android.support.v4.content.AsyncTaskLoader;
5 |
6 | abstract class AbstractLoader extends AsyncTaskLoader {
7 |
8 | private T mItem;
9 |
10 | AbstractLoader(Context context) {
11 | super(context);
12 | }
13 |
14 | @Override
15 | public void deliverResult(final T item) {
16 | mItem = item;
17 |
18 | if (isStarted()) {
19 | super.deliverResult(item);
20 | }
21 | }
22 |
23 | @Override
24 | protected void onStartLoading() {
25 | if (mItem != null) {
26 | deliverResult(mItem);
27 | }
28 |
29 | if (takeContentChanged() || mItem == null) {
30 | forceLoad();
31 | }
32 | }
33 |
34 | @Override
35 | protected void onStopLoading() {
36 | cancelLoad();
37 | }
38 |
39 | @Override
40 | protected void onReset() {
41 | super.onReset();
42 |
43 | onStopLoading();
44 | }
45 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/view/ProgrammableSlidingPaneLayout.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.view;
2 |
3 | import android.content.Context;
4 | import android.support.v4.widget.SlidingPaneLayout;
5 | import android.util.AttributeSet;
6 | import android.view.MotionEvent;
7 |
8 | public class ProgrammableSlidingPaneLayout extends SlidingPaneLayout {
9 |
10 | private boolean mShouldSlide = true;
11 |
12 | public ProgrammableSlidingPaneLayout(final Context context) {
13 | super(context);
14 | }
15 |
16 | public ProgrammableSlidingPaneLayout(final Context context, AttributeSet attrs) {
17 | super(context, attrs);
18 | }
19 |
20 | public ProgrammableSlidingPaneLayout(Context context, AttributeSet attrs, int defStyle) {
21 | super(context, attrs, defStyle);
22 | }
23 |
24 | @Override
25 | public boolean onInterceptTouchEvent(final MotionEvent ev) {
26 | return mShouldSlide && super.onInterceptTouchEvent(ev);
27 | }
28 |
29 | public void setSlideable(final boolean slide) {
30 | mShouldSlide = slide;
31 | }
32 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/dcc_file_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
25 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/actionbar_custom_view_done.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffffffff
4 | #202122
5 |
6 | #ff33b5e5
7 |
8 | #f9f9f9
9 | #a2a2a2
10 | #ff2f2f2f
11 | #cc222222
12 | #ff323232
13 |
14 | #e2e2e2
15 |
16 | #215C94
17 | #18436D
18 | #2870b4
19 | #ffffff
20 |
21 | @color/colorPrimaryDark
22 |
23 | @color/colorPrimaryDark
24 |
25 | @color/colorPrimaryDark
26 |
27 | @color/colorPrimary
28 |
29 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
28 |
29 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/actionbar_custom_view_done_cancel.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/activity_server_channel_ab.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/default_user_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
11 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/bug_reporting_preference_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
24 |
29 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/activity_server_settings_channellist_ab.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 | 250dp
24 |
25 |
26 | 4dp
27 | 8dp
28 | 16dp
29 | 32dp
30 | 64dp
31 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/activatable_item_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/misc/NickCache.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.misc;
2 |
3 | import com.fusionx.bus.Subscribe;
4 | import com.fusionx.lightirc.event.OnPreferencesChangedEvent;
5 | import com.fusionx.lightirc.model.NickColour;
6 |
7 | import android.support.v4.util.LruCache;
8 |
9 | import co.fusionx.relay.base.Nick;
10 |
11 | import static com.fusionx.lightirc.util.MiscUtils.getBus;
12 |
13 | public class NickCache extends LruCache {
14 |
15 | public static final int NICK_CACHE_MAX_SIZE = 1000;
16 |
17 | private static NickCache mNickCache;
18 |
19 | public NickCache() {
20 | super(NICK_CACHE_MAX_SIZE);
21 |
22 | // If the preferences change then clear the cache
23 | getBus().register(new Object() {
24 | @Subscribe
25 | public void onEvent(final OnPreferencesChangedEvent event) {
26 | evictAll();
27 | }
28 | }, 300);
29 | }
30 |
31 | public static NickCache getNickCache() {
32 | if (mNickCache == null) {
33 | mNickCache = new NickCache();
34 | }
35 | return mNickCache;
36 | }
37 |
38 | @Override
39 | protected NickColour create(Nick key) {
40 | synchronized (this) {
41 | return new NickColour(key);
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/dialogbuilder/NickDialogBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui.dialogbuilder;
23 |
24 | import com.fusionx.lightirc.R;
25 |
26 | import android.content.Context;
27 |
28 | public abstract class NickDialogBuilder extends DialogBuilder {
29 |
30 | public NickDialogBuilder(final Context context, final String nick) {
31 | super(context, context.getString(R.string.nickname), context.getString(R.string.new_nick),
32 | nick);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/activty_server_settings_cab.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/DatabaseUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 |
5 | import android.database.Cursor;
6 |
7 | import java.util.ArrayList;
8 | import java.util.Arrays;
9 | import java.util.List;
10 |
11 | public class DatabaseUtils {
12 |
13 | private static final String strSeparator = "__,__";
14 |
15 | public static String convertStringListToString(final List list) {
16 | final StringBuilder builder = new StringBuilder();
17 | for (int i = 0; i < list.size(); i++) {
18 | builder.append(list.get(i));
19 | if (i < list.size() - 1) {
20 | builder.append(strSeparator);
21 | }
22 | }
23 | return builder.toString();
24 | }
25 |
26 | public static List convertStringToArray(final String str) {
27 | if (StringUtils.isEmpty(str)) {
28 | return new ArrayList<>();
29 | }
30 | return Arrays.asList(str.split(strSeparator));
31 | }
32 |
33 | public static String getStringByName(final Cursor cursor, final String name) {
34 | return cursor.getString(cursor.getColumnIndex(name));
35 | }
36 |
37 | public static int getIntByName(final Cursor cursor, final String name) {
38 | return cursor.getInt(cursor.getColumnIndex(name));
39 | }
40 | }
--------------------------------------------------------------------------------
/android/src/main/res/menu/activity_server_list_popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/misc/FormattedString.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.misc;
2 |
3 | import android.text.style.CharacterStyle;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | public class FormattedString {
9 |
10 | private final String mString;
11 |
12 | public static class Span {
13 | int start;
14 | int end;
15 | CharacterStyle style;
16 | private Span(int start, int end, CharacterStyle style) {
17 | this.start = start;
18 | this.end = end;
19 | this.style = style;
20 | }
21 | }
22 |
23 | private final ArrayList mSpans = new ArrayList<>();
24 |
25 | public FormattedString(final String string) {
26 | mString = string;
27 | }
28 |
29 | public FormattedString(final String string, final CharacterStyle characterStyle) {
30 | mString = string;
31 | mSpans.add(new Span(0, string.length(), characterStyle));
32 | }
33 |
34 | public void addSpan(final CharacterStyle style, int start, int end) {
35 | mSpans.add(new Span(start, end, style));
36 | }
37 |
38 | public String getString() {
39 | return mString;
40 | }
41 |
42 | public List getSpans() {
43 | return mSpans;
44 | }
45 |
46 | @Override
47 | public String toString() {
48 | return mString;
49 | }
50 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/invites_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
21 |
22 |
23 |
31 |
32 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/include_done_button.xml:
--------------------------------------------------------------------------------
1 |
16 |
23 |
24 |
34 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/include_cancel_button.xml:
--------------------------------------------------------------------------------
1 |
16 |
23 |
24 |
34 |
--------------------------------------------------------------------------------
/android/src/main/res/menu/activity_main_ab.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/helper/RestartAppPreferenceListener.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.helper;
2 |
3 | import android.content.Context;
4 | import android.content.DialogInterface;
5 | import android.content.Intent;
6 | import android.preference.Preference;
7 | import android.support.v7.app.AlertDialog;
8 |
9 | import com.fusionx.lightirc.R;
10 | import com.fusionx.lightirc.ui.MainActivity;
11 |
12 | public class RestartAppPreferenceListener implements Preference.OnPreferenceChangeListener {
13 |
14 | private Context mContext;
15 |
16 | public RestartAppPreferenceListener(final Context context) {
17 | mContext = context;
18 | }
19 |
20 | @Override
21 | public boolean onPreferenceChange(final Preference preference, final Object o) {
22 | final DialogInterface.OnClickListener listener = (dialogInterface, i) -> {
23 | final Intent intent = new Intent(mContext, MainActivity.class);
24 | intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
25 | intent.putExtra(MainActivity.CLEAR_CACHE, true);
26 | mContext.startActivity(intent);
27 | };
28 |
29 | new AlertDialog.Builder(mContext)
30 | .setMessage(mContext.getString(R.string.appearance_settings_requires_restart))
31 | .setPositiveButton(mContext.getString(R.string.restart), listener)
32 | .show();
33 | return true;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/misc/EventCache.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.misc;
2 |
3 | import com.fusionx.bus.Subscribe;
4 | import com.fusionx.lightirc.event.OnPreferencesChangedEvent;
5 | import com.fusionx.lightirc.model.EventDecorator;
6 |
7 | import android.content.Context;
8 | import android.support.v4.util.LruCache;
9 |
10 | import co.fusionx.relay.event.Event;
11 |
12 | import static com.fusionx.lightirc.util.MiscUtils.getBus;
13 |
14 | public class EventCache extends LruCache {
15 |
16 | public static final int EVENT_CACHE_MAX_SIZE = 300;
17 |
18 | private final IRCEventToStringConverter mConverter;
19 | private final boolean mForDarkBackground;
20 |
21 | public EventCache(final Context context, final boolean darkBackground) {
22 | super(EVENT_CACHE_MAX_SIZE);
23 |
24 | mConverter = IRCEventToStringConverter.getConverter(context);
25 | mForDarkBackground = darkBackground;
26 |
27 | // If the preferences change then clear the cache
28 | getBus().register(new Object() {
29 | @Subscribe
30 | public void onEvent(final OnPreferencesChangedEvent event) {
31 | evictAll();
32 | }
33 | }, 300);
34 | }
35 |
36 | @Override
37 | protected EventDecorator create(final Event key) {
38 | synchronized (mConverter) {
39 | return mConverter.getEventDecorator(key, mForDarkBackground);
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/model/NickColour.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.model;
2 |
3 | import com.fusionx.lightirc.misc.AppPreferences;
4 | import com.fusionx.lightirc.misc.Theme;
5 |
6 | import android.graphics.Color;
7 |
8 | import co.fusionx.relay.base.Nick;
9 |
10 | public class NickColour {
11 |
12 | private final Nick mNick;
13 |
14 | private final int mColour;
15 |
16 | public NickColour(final Nick nick) {
17 | mNick = nick;
18 | mColour = getColorFromNick();
19 | }
20 |
21 | public int getColour() {
22 | return mColour;
23 | }
24 |
25 | private int getColorFromNick() {
26 | final Theme theme = AppPreferences.getAppPreferences().getTheme();
27 | final int colorOffset = theme.getTextColourOffset();
28 | final int hash = mNick.hashCode();
29 |
30 | int red = (hash) & 0xFF;
31 | int green = (hash >> 16) & 0xFF;
32 | int blue = (hash >> 8) & 0xFF;
33 |
34 | // mix the color
35 | red = normaliseColourInt((red + colorOffset) / 2);
36 | green = normaliseColourInt((green + colorOffset) / 2);
37 | blue = normaliseColourInt((blue + colorOffset) / 2);
38 |
39 | return Color.rgb(red, green, blue);
40 | }
41 |
42 | private int normaliseColourInt(final int colour) {
43 | if (colour > 255) {
44 | return 255;
45 | } else if (colour < 0) {
46 | return 0;
47 | }
48 | return colour;
49 | }
50 | }
--------------------------------------------------------------------------------
/android/src/main/res/menu/fragment_userlist_cab.xml:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/main_list_child.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
17 |
18 |
30 |
31 |
37 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/loader/ServerWrapperLoader.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.loader;
2 |
3 | import com.fusionx.lightirc.model.ServerConversationContainer;
4 | import com.fusionx.lightirc.model.db.ServerDatabase;
5 | import com.fusionx.lightirc.service.IRCService;
6 |
7 | import android.content.Context;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Collection;
11 |
12 | import co.fusionx.relay.base.Server;
13 | import co.fusionx.relay.base.ServerConfiguration;
14 |
15 | public class ServerWrapperLoader extends AbstractLoader> {
16 |
17 | private final IRCService mService;
18 |
19 | public ServerWrapperLoader(final Context context, final IRCService service) {
20 | super(context);
21 |
22 | mService = service;
23 | }
24 |
25 | @Override
26 | public ArrayList loadInBackground() {
27 | final ArrayList listItems = new ArrayList<>();
28 | final ServerDatabase source = ServerDatabase.getInstance(getContext());
29 | for (final ServerConfiguration.Builder builder : source.getAllBuilders()) {
30 | final Server server = mService.getServerIfExists(builder);
31 | final Collection ignoreList = source.getIgnoreListByName(builder.getTitle());
32 | final ServerConversationContainer wrapper = new ServerConversationContainer(builder,
33 | ignoreList, server);
34 | listItems.add(wrapper);
35 | }
36 | return listItems;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/BuilderUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | import co.fusionx.relay.base.ServerConfiguration;
7 | import co.fusionx.relay.misc.NickStorage;
8 |
9 | class BuilderUtils {
10 |
11 | public static List getFirstTimeBuilderList() {
12 | final ServerConfiguration.Builder freenode = new ServerConfiguration.Builder();
13 | freenode.setTitle("Freenode").setUrl("chat.freenode.net").setPort(6667).setSsl(false);
14 | freenode.setNickStorage(new NickStorage("HoloIRCUser", "", ""));
15 | freenode.setRealName("HoloIRCUser").setNickChangeable(true).setServerUserName("holoirc");
16 |
17 | final ServerConfiguration.Builder snoonet = new ServerConfiguration.Builder();
18 | snoonet.setTitle("Snoonet").setUrl("irc.snoonet.org").setPort(6667).setSsl(false);
19 | snoonet.setNickStorage(new NickStorage("HoloIRCUser", "", ""));
20 | snoonet.setRealName("HoloIRCUser").setNickChangeable(true).setServerUserName("holoirc");
21 |
22 | final ServerConfiguration.Builder techtronix = new ServerConfiguration.Builder();
23 | techtronix.setTitle("Techtronix").setUrl("irc.techtronix.net").setPort(6667)
24 | .setSsl(false);
25 | techtronix.setNickStorage(new NickStorage("HoloIRCUser", "", ""));
26 | techtronix.setRealName("HoloIRCUser").setNickChangeable(true).setServerUserName("holoirc");
27 |
28 | return Arrays.asList(freenode, snoonet, techtronix);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/ignore_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
35 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/ServerPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 | import com.fusionx.lightirc.interfaces.ServerSettingsCallbacks;
5 |
6 | import android.annotation.TargetApi;
7 | import android.app.Activity;
8 | import android.content.Context;
9 | import android.os.Build;
10 | import android.os.Bundle;
11 | import android.preference.PreferenceFragment;
12 |
13 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
14 | public class ServerPreferenceFragment extends PreferenceFragment {
15 |
16 | private ServerSettingsCallbacks mCallback = null;
17 |
18 | @Override
19 | public void onAttach(Activity activity) {
20 | super.onAttach(activity);
21 | try {
22 | mCallback = (ServerSettingsCallbacks) activity;
23 | } catch (ClassCastException ex) {
24 | ex.printStackTrace();
25 | }
26 | }
27 |
28 | @Override
29 | public void onCreate(final Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 |
32 | setHasOptionsMenu(true);
33 |
34 | getPreferenceManager().setSharedPreferencesMode(Context.MODE_MULTI_PROCESS);
35 | getPreferenceManager().setSharedPreferencesName("tempUselessFile");
36 |
37 | addPreferencesFromResource(R.xml.activty_server_settings_prefs);
38 | }
39 |
40 | @Override
41 | public void onActivityCreated(final Bundle savedInstanceState) {
42 | super.onActivityCreated(savedInstanceState);
43 |
44 | mCallback.setupPreferences(getPreferenceScreen(), getActivity());
45 | }
46 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/DefaultNickPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import com.fusionx.lightirc.misc.PreferenceConstants;
4 |
5 | import android.content.Context;
6 | import android.content.SharedPreferences;
7 | import android.util.AttributeSet;
8 |
9 | public class DefaultNickPreference extends AbstractNickPreference {
10 |
11 | public DefaultNickPreference(Context context, AttributeSet attrs) {
12 | super(context, attrs);
13 | }
14 |
15 | @Override
16 | protected void retrieveNick() {
17 | final SharedPreferences preferences = getSharedPreferences();
18 | mFirstChoice.setText(preferences.getString(PreferenceConstants.PREF_DEFAULT_FIRST_NICK,
19 | "HoloIRCUser"));
20 | mSecondChoice
21 | .setText(preferences.getString(PreferenceConstants.PREF_DEFAULT_SECOND_NICK, ""));
22 | mThirdChoice
23 | .setText(preferences.getString(PreferenceConstants.PREF_DEFAULT_THIRD_NICK, ""));
24 | }
25 |
26 | @Override
27 | protected void persistNick() {
28 | final SharedPreferences.Editor editor = getEditor();
29 | editor.putString(PreferenceConstants.PREF_DEFAULT_FIRST_NICK,
30 | mFirstChoice.getText().toString());
31 | editor.putString(PreferenceConstants.PREF_DEFAULT_SECOND_NICK,
32 | mSecondChoice.getText().toString());
33 | editor.putString(PreferenceConstants.PREF_DEFAULT_THIRD_NICK,
34 | mThirdChoice.getText().toString());
35 | editor.commit();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/dcc_pending_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
24 |
25 |
37 |
--------------------------------------------------------------------------------
/android/src/internal/java/com/fusionx/lightirc/util/CrashUtils.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.util;
2 |
3 | import android.content.Context;
4 |
5 | import com.crashlytics.android.Crashlytics;
6 | import com.fusionx.lightirc.misc.AppPreferences;
7 |
8 | import co.fusionx.relay.base.Server;
9 | import io.fabric.sdk.android.Fabric;
10 |
11 | public class CrashUtils {
12 |
13 | public static void startCrashlyticsIfAppropriate(final Context context) {
14 | callbackIfReportingEnabled(() -> Fabric.with(context, new Crashlytics()));
15 | }
16 |
17 | public static void logMissingData(final Server server) {
18 | callbackIfReportingEnabled(() -> {
19 | Crashlytics.log(server.getConfiguration().getUrl());
20 | Crashlytics.logException(new IRCException("Missing data on server"));
21 | });
22 | }
23 |
24 | public static void logIssue(final String data) {
25 | callbackIfReportingEnabled(() -> {
26 | Crashlytics.log(data);
27 | Crashlytics.logException(new IRCException(data));
28 | });
29 | }
30 |
31 | private static void callbackIfReportingEnabled(final Runnable runnable) {
32 | final AppPreferences appPreferences = AppPreferences.getAppPreferences();
33 | if (appPreferences.isBugReportingEnabled()) {
34 | runnable.run();
35 | }
36 | }
37 |
38 | public static void handleException(Exception ex) {
39 | callbackIfReportingEnabled(() -> Crashlytics.logException(ex));
40 | }
41 |
42 | private static class IRCException extends Exception {
43 | public IRCException(final String data) {
44 | super(data);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/ViewPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import com.fusionx.lightirc.R;
4 | import com.fusionx.lightirc.util.UIUtils;
5 |
6 | import android.content.Context;
7 | import android.preference.Preference;
8 | import android.util.AttributeSet;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 | import android.widget.TextView;
13 |
14 | /**
15 | * Hacky way to add a view to a settings fragment
16 | *
17 | * @author Lalit Maganti
18 | */
19 | public class ViewPreference extends Preference {
20 |
21 | private final LayoutInflater mLayoutInflater;
22 |
23 | private TextView mTextView;
24 |
25 | private String mText;
26 |
27 | public ViewPreference(final Context context, final AttributeSet attrs) {
28 | super(context, attrs);
29 |
30 | mLayoutInflater = LayoutInflater.from(getContext());
31 | }
32 |
33 | @Override
34 | public View getView(final View convertView, final ViewGroup parent) {
35 | if (convertView == null) {
36 | mTextView = (TextView) mLayoutInflater.inflate(R.layout.must_be_complete_textview,
37 | parent, false);
38 | UIUtils.setRobotoLight(getContext(), mTextView);
39 | mTextView.setText(mText);
40 | return mTextView;
41 | }
42 | return convertView;
43 | }
44 |
45 | public void setInitialText(final CharSequence text) {
46 | mText = getContext().getString(R.string.server_settings_non_empty, text);
47 | if (mTextView != null) {
48 | mTextView.setText(mText);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/android/src/main/res/xml/app_settings_headers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
16 |
20 |
24 |
28 |
32 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/NotificationPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 |
5 | import android.content.Context;
6 | import android.os.Bundle;
7 | import android.os.Vibrator;
8 | import android.preference.MultiSelectListPreference;
9 | import android.preference.PreferenceFragment;
10 |
11 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_IN_APP_NOTIFICATION_SETTINGS;
12 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_OUT_OF_APP_NOTIFICATION_SETTINGS;
13 |
14 | public class NotificationPreferenceFragment extends PreferenceFragment {
15 |
16 | @Override
17 | public void onCreate(final Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | addPreferencesFromResource(R.xml.notification_settings);
20 | setHasOptionsMenu(true);
21 |
22 | final Vibrator vibrator = (Vibrator) getActivity().getSystemService(Context
23 | .VIBRATOR_SERVICE);
24 | if (!vibrator.hasVibrator()) {
25 | final MultiSelectListPreference inAppSettings = (MultiSelectListPreference)
26 | findPreference(PREF_IN_APP_NOTIFICATION_SETTINGS);
27 | final MultiSelectListPreference outOfAppSettings = (MultiSelectListPreference)
28 | findPreference(PREF_OUT_OF_APP_NOTIFICATION_SETTINGS);
29 |
30 | inAppSettings.setEntries(R.array.notification_in_entries_no_vibrator);
31 | inAppSettings.setEntryValues(R.array.notification_in_values_no_vibrator);
32 | outOfAppSettings.setEntries(R.array.notification_out_entries_no_vibrator);
33 | outOfAppSettings.setEntryValues(R.array.notification_out_values_no_vibrator);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/irc_listview_textview.xml:
--------------------------------------------------------------------------------
1 |
21 |
24 |
25 |
33 |
34 |
42 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/NickPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.util.AttributeSet;
6 |
7 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_NICK;
8 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_SECOND_NICK;
9 | import static com.fusionx.lightirc.misc.PreferenceConstants.PREF_THIRD_NICK;
10 |
11 | public class NickPreference extends AbstractNickPreference {
12 |
13 | public NickPreference(Context context, AttributeSet attrs) {
14 | super(context, attrs);
15 | }
16 |
17 | public void setNickChoices(final String first, final String second, final String third) {
18 | final SharedPreferences.Editor editor = getEditor();
19 | editor.putString(PREF_NICK, first);
20 | editor.putString(PREF_SECOND_NICK, second);
21 | editor.putString(PREF_THIRD_NICK, third);
22 | editor.commit();
23 | }
24 |
25 | @Override
26 | protected void retrieveNick() {
27 | final SharedPreferences sharedPreferences = getSharedPreferences();
28 | mFirstChoice.setText(sharedPreferences.getString(PREF_NICK, "HoloIRCUser"));
29 | mSecondChoice.setText(sharedPreferences.getString(PREF_SECOND_NICK, ""));
30 | mThirdChoice.setText(sharedPreferences.getString(PREF_THIRD_NICK, ""));
31 | }
32 |
33 | @Override
34 | protected void persistNick() {
35 | final SharedPreferences.Editor editor = getEditor();
36 | editor.putString(PREF_NICK, getFirstNickText());
37 | editor.putString(PREF_SECOND_NICK, getSecondNickText());
38 | editor.putString(PREF_THIRD_NICK, getThirdNickText());
39 | editor.commit();
40 | }
41 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/ServerTitleEditTextPreference.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui.preferences;
2 |
3 | import android.app.AlertDialog;
4 | import android.content.Context;
5 | import android.content.DialogInterface;
6 | import android.util.AttributeSet;
7 |
8 | import java.util.ArrayList;
9 |
10 | public class ServerTitleEditTextPreference extends NonEmptyEditTextPreference {
11 |
12 | private ArrayList mListOfExistingServers;
13 |
14 | public ServerTitleEditTextPreference(Context context, AttributeSet attributes) {
15 | super(context, attributes);
16 | }
17 |
18 | // Getters and setters
19 | public void setListOfExistingServers(ArrayList listOfExistingServers) {
20 | mListOfExistingServers = listOfExistingServers;
21 | }
22 |
23 | @Override
24 | protected AlertDialog onEditTextChanged() {
25 | AlertDialog dialog = super.onEditTextChanged();
26 | if (dialog != null && mListOfExistingServers != null) {
27 | final String currentText = getEditText().getText().toString();
28 | if (currentText.contains("/")) {
29 | getEditText().setError("The character / is not allowed in the title");
30 | dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(false);
31 | return dialog;
32 | }
33 | for (String title : mListOfExistingServers) {
34 | if (title.equalsIgnoreCase(currentText)) {
35 | getEditText().setError("Server with the same name already exists.");
36 | dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(false);
37 | return dialog;
38 | }
39 | }
40 | }
41 | return dialog;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/navigation_drawer_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
23 |
24 |
29 |
30 |
38 |
39 |
40 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/expandable_list_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
25 |
26 |
31 |
32 |
43 |
44 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/app_settings_headers_legacy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
11 |
12 |
15 |
19 |
20 |
23 |
27 |
28 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/activatable_selector_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/notification_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
19 |
20 |
21 |
26 |
27 |
35 |
36 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/ignored_users_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
22 |
23 |
33 |
34 |
35 |
43 |
44 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/DCCChatFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.bus.Subscribe;
25 | import com.fusionx.bus.ThreadType;
26 | import com.fusionx.lightirc.misc.FragmentType;
27 |
28 | import java.util.List;
29 |
30 | import co.fusionx.relay.dcc.chat.DCCChatConversation;
31 | import co.fusionx.relay.dcc.event.chat.DCCChatEvent;
32 | import co.fusionx.relay.parser.UserInputParser;
33 |
34 | public class DCCChatFragment extends IRCFragment {
35 |
36 | public DCCChatConversation getChatConnection() {
37 | return (DCCChatConversation) mConversation;
38 | }
39 |
40 | // Subscription methods
41 | @Subscribe(threadType = ThreadType.MAIN)
42 | public void onEventMainThread(final DCCChatEvent event) {
43 | mMessageAdapter.add(event);
44 | }
45 |
46 | @Override
47 | public void onSendMessage(final String message) {
48 | UserInputParser.onParseDCCChatEvent(getChatConnection(), message);
49 | }
50 |
51 | @Override
52 | public FragmentType getType() {
53 | return FragmentType.DCCCHAT;
54 | }
55 |
56 | @Override
57 | protected List getAdapterData() {
58 | return getChatConnection().getBuffer();
59 | }
60 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/invite_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
30 |
31 |
47 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/fragment_irc.xml:
--------------------------------------------------------------------------------
1 |
21 |
24 |
25 |
35 |
36 |
49 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/ServerChannelPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.lightirc.R;
25 | import com.fusionx.lightirc.misc.PreferenceConstants;
26 | import com.fusionx.lightirc.ui.preferences.NumberPickerPreference;
27 |
28 | import android.annotation.TargetApi;
29 | import android.os.Build;
30 | import android.os.Bundle;
31 | import android.preference.PreferenceFragment;
32 |
33 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
34 | public class ServerChannelPreferenceFragment extends PreferenceFragment {
35 |
36 | @Override
37 | public void onCreate(final Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | addPreferencesFromResource(R.xml.server_channel_settings_fragment);
40 |
41 | final NumberPickerPreference numberPickerDialogPreference = (NumberPickerPreference)
42 | getPreferenceScreen().findPreference(PreferenceConstants.PREF_RECONNECT_TRIES);
43 | numberPickerDialogPreference.setSummary(String.valueOf(numberPickerDialogPreference
44 | .getValue()));
45 |
46 | numberPickerDialogPreference.setOnPreferenceChangeListener((preference, newValue) -> {
47 | preference.setSummary(String.valueOf(newValue));
48 | return true;
49 | });
50 | }
51 | }
--------------------------------------------------------------------------------
/android/src/main/res/xml/appearance_settings_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
24 |
26 |
31 |
36 |
37 |
39 |
45 |
46 |
--------------------------------------------------------------------------------
/android/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/UserFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.bus.Subscribe;
25 | import com.fusionx.bus.ThreadType;
26 | import com.fusionx.lightirc.misc.FragmentType;
27 |
28 | import java.util.List;
29 |
30 | import co.fusionx.relay.base.QueryUser;
31 | import co.fusionx.relay.event.query.QueryEvent;
32 | import co.fusionx.relay.parser.UserInputParser;
33 |
34 | public class UserFragment extends IRCFragment {
35 |
36 | public QueryUser getQueryUser() {
37 | return (QueryUser) mConversation;
38 | }
39 |
40 | // Subscription methods
41 | @Subscribe(threadType = ThreadType.MAIN)
42 | public void onEventMainThread(final QueryEvent event) {
43 | final int position = mLayoutManager.findLastCompletelyVisibleItemPosition();
44 | mMessageAdapter.add(event);
45 | if (position == mMessageAdapter.getItemCount() - 2) {
46 | mRecyclerView.scrollToPosition(mMessageAdapter.getItemCount() - 1);
47 | }
48 | }
49 |
50 | @Override
51 | public void onSendMessage(final String message) {
52 | UserInputParser.onParseUserMessage(getQueryUser(), message);
53 | }
54 |
55 | @Override
56 | public FragmentType getType() {
57 | return FragmentType.USER;
58 | }
59 |
60 | @Override
61 | protected List extends QueryEvent> getAdapterData() {
62 | return getQueryUser().getBuffer();
63 | }
64 | }
--------------------------------------------------------------------------------
/android/src/main/res/layout/main_list_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
22 |
23 |
29 |
30 |
37 |
38 |
47 |
48 |
49 |
55 |
--------------------------------------------------------------------------------
/android/src/main/res/xml/server_channel_settings_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
16 |
21 |
26 |
31 |
32 |
33 |
34 |
39 |
44 |
45 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/AboutPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.lightirc.R;
25 | import com.fusionx.lightirc.misc.PreferenceConstants;
26 | import com.fusionx.lightirc.util.MiscUtils;
27 |
28 | import android.content.Context;
29 | import android.content.Intent;
30 | import android.net.Uri;
31 | import android.os.Bundle;
32 | import android.preference.Preference;
33 | import android.preference.PreferenceFragment;
34 | import android.preference.PreferenceScreen;
35 |
36 | public class AboutPreferenceFragment extends PreferenceFragment {
37 |
38 | @Override
39 | public void onCreate(final Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | addPreferencesFromResource(R.xml.about_settings_fragment);
42 |
43 | final PreferenceScreen screen = getPreferenceScreen();
44 | final Context context = getActivity();
45 | final Preference appVersionPreference = screen.findPreference(PreferenceConstants
46 | .PREF_APP_VERSION);
47 |
48 | if (appVersionPreference != null) {
49 | appVersionPreference.setSummary(MiscUtils.getAppVersion(context));
50 | }
51 |
52 | final Preference source = screen.findPreference(PreferenceConstants.PREF_SOURCE);
53 | if (source != null) {
54 | source.setOnPreferenceClickListener(preference -> {
55 | final Intent browserIntent = new Intent(Intent.ACTION_VIEW,
56 | Uri.parse("http://github.com/tilal6991/HoloIRC"));
57 | context.startActivity(browserIntent);
58 | return true;
59 | });
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
17 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/ServerFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.bus.Subscribe;
25 | import com.fusionx.bus.ThreadType;
26 | import com.fusionx.lightirc.misc.FragmentType;
27 |
28 | import android.os.Bundle;
29 | import android.view.View;
30 |
31 | import java.util.List;
32 |
33 | import co.fusionx.relay.event.server.ServerEvent;
34 | import co.fusionx.relay.parser.UserInputParser;
35 |
36 | import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN;
37 |
38 | public class ServerFragment extends IRCFragment {
39 |
40 | @Override
41 | public void onViewCreated(final View view, final Bundle savedInstanceState) {
42 | super.onViewCreated(view, savedInstanceState);
43 |
44 | getActivity().getWindow().setSoftInputMode(SOFT_INPUT_STATE_HIDDEN);
45 | }
46 |
47 | @Override
48 | public void onSendMessage(final String message) {
49 | UserInputParser.onParseServerMessage(mConversation.getServer(), message);
50 | }
51 |
52 | @Override
53 | public FragmentType getType() {
54 | return FragmentType.SERVER;
55 | }
56 |
57 | // Subscription methods
58 | @Subscribe(threadType = ThreadType.MAIN)
59 | public void onEvent(final ServerEvent event) {
60 | final int position = mLayoutManager.findLastCompletelyVisibleItemPosition();
61 | mMessageAdapter.add(event);
62 | if (position == mMessageAdapter.getItemCount() - 2) {
63 | mRecyclerView.scrollToPosition(mMessageAdapter.getItemCount() - 1);
64 | }
65 | }
66 |
67 | @Override
68 | protected List extends ServerEvent> getAdapterData() {
69 | return mConversation.getServer().getBuffer();
70 | }
71 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/AppearancePreferenceFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui;
23 |
24 | import com.fusionx.lightirc.R;
25 | import com.fusionx.lightirc.misc.PreferenceConstants;
26 | import com.fusionx.lightirc.ui.helper.RestartAppPreferenceListener;
27 |
28 | import android.os.Bundle;
29 | import android.preference.ListPreference;
30 | import android.preference.PreferenceFragment;
31 | import android.preference.PreferenceScreen;
32 |
33 | import static com.fusionx.lightirc.misc.PreferenceConstants.FRAGMENT_SETTINGS_THEME;
34 |
35 | public class AppearancePreferenceFragment extends PreferenceFragment {
36 |
37 | @Override
38 | public void onCreate(final Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | addPreferencesFromResource(R.xml.appearance_settings_fragment);
41 |
42 | final PreferenceScreen screen = getPreferenceScreen();
43 | final ListPreference theme = (ListPreference) screen.findPreference
44 | (FRAGMENT_SETTINGS_THEME);
45 | if (theme.getEntry() == null) {
46 | theme.setValue("1");
47 | }
48 | theme.setOnPreferenceChangeListener(new RestartAppPreferenceListener(getActivity()));
49 | theme.setSummary(theme.getEntry());
50 |
51 | final ListPreference fontSize = (ListPreference) screen.findPreference
52 | (PreferenceConstants.PREF_MAIN_FONT_SIZE);
53 | fontSize.setOnPreferenceChangeListener((preference, newValue) -> {
54 | final CharSequence summary = fontSize.getEntries()[fontSize
55 | .findIndexOfValue(String.valueOf(newValue))];
56 | fontSize.setSummary(summary);
57 | return true;
58 | });
59 | fontSize.setSummary(fontSize.getEntry());
60 | }
61 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/SlidingPaneToggleArrow.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.fusionx.lightirc.ui;
17 |
18 | import android.support.v4.widget.SlidingPaneLayout;
19 | import android.support.v7.app.AppCompatActivity;
20 | import android.support.v7.graphics.drawable.DrawerArrowDrawable;
21 | import android.view.MenuItem;
22 | import android.view.View;
23 |
24 | public class SlidingPaneToggleArrow implements SlidingPaneLayout.PanelSlideListener {
25 | private final AppCompatActivity mActivity;
26 | private final SlidingPaneLayout mPaneLayout;
27 | private DrawerArrowDrawable mSlider;
28 |
29 | public SlidingPaneToggleArrow(AppCompatActivity activity, SlidingPaneLayout paneLayout) {
30 | mActivity = activity;
31 | mPaneLayout = paneLayout;
32 | mSlider = new DrawerArrowDrawable(activity.getSupportActionBar().getThemedContext());
33 | }
34 |
35 | public void syncState() {
36 | if (mPaneLayout.isOpen()) {
37 | mSlider.setProgress(1);
38 | } else {
39 | mSlider.setProgress(0);
40 | }
41 | mActivity.getSupportActionBar().setHomeAsUpIndicator(mSlider);
42 | }
43 |
44 | public boolean onOptionsItemSelected(MenuItem item) {
45 | if (item != null && item.getItemId() == android.R.id.home) {
46 | toggle();
47 | return true;
48 | }
49 | return false;
50 | }
51 |
52 | private void toggle() {
53 | if (mPaneLayout.isOpen()) {
54 | mPaneLayout.closePane();
55 | } else {
56 | mPaneLayout.openPane();
57 | }
58 | }
59 |
60 | @Override
61 | public void onPanelSlide(View view, float slideOffset) {
62 | mSlider.setProgress(Math.min(1f, Math.max(0, slideOffset)));
63 | }
64 |
65 | @Override
66 | public void onPanelOpened(View view) {
67 | mSlider.setProgress(1);
68 | }
69 |
70 | @Override
71 | public void onPanelClosed(View view) {
72 | mSlider.setProgress(0);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/android/src/main/res/values/plurals.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 | - 1 user selected
25 | - %d users selected
26 |
27 |
28 |
29 | - 1 channel selected
30 | - %d channels selected
31 |
32 |
33 |
34 | - 1 server connected
35 | - %d servers connected
36 |
37 |
38 |
39 | - 1 server disconnected
40 | - %d servers disconnected
41 |
42 |
43 |
44 | - 1 server connecting
45 | - %d servers connecting
46 |
47 |
48 |
49 | - 1 server reconnecting
50 | - %d servers reconnecting
51 |
52 |
53 |
54 | - 1 mention
55 | - %d mentions
56 |
57 |
58 |
59 | - 1 query
60 | - %d queries
61 |
62 |
63 |
64 | - 1 user
65 | - %d users
66 |
67 |
68 |
69 | - \u2026 skipped 1 entry\u2026
70 | - \u2026 skipped %d entries\u2026
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/fragment_channel.xml:
--------------------------------------------------------------------------------
1 |
21 |
24 |
25 |
35 |
36 |
41 |
42 |
51 |
52 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
17 |
22 |
23 |
28 |
29 |
39 |
40 |
41 |
48 |
49 |
50 |
51 |
52 |
61 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/nick_choices_edit_texts.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
25 |
26 |
37 |
38 |
46 |
47 |
58 |
59 |
67 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/dcc_pending_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
30 |
31 |
46 |
47 |
62 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/LoggingPreferenceFragment.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 | import com.fusionx.lightirc.misc.PreferenceConstants;
5 | import com.fusionx.lightirc.util.PreferenceUtils;
6 |
7 | import android.content.SharedPreferences;
8 | import android.os.Bundle;
9 | import android.preference.Preference;
10 | import android.preference.PreferenceFragment;
11 | import android.support.v4.view.MenuItemCompat;
12 | import android.support.v7.widget.SwitchCompat;
13 | import android.view.Menu;
14 | import android.view.MenuInflater;
15 | import android.view.View;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | public class LoggingPreferenceFragment extends PreferenceFragment {
21 |
22 | private List mPreferenceList;
23 |
24 | @Override
25 | public void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | addPreferencesFromResource(R.xml.logging_settings);
28 | setHasOptionsMenu(true);
29 | }
30 |
31 | @Override
32 | public void onViewCreated(View view, Bundle savedInstanceState) {
33 | super.onViewCreated(view, savedInstanceState);
34 |
35 | final SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
36 | final boolean logging = preferences.getBoolean(PreferenceConstants.PREF_LOGGING, false);
37 |
38 | mPreferenceList = new ArrayList<>();
39 | PreferenceUtils.getPreferenceList(getPreferenceScreen(), mPreferenceList);
40 |
41 | updatePreferencesEnabled(logging);
42 | }
43 |
44 | @Override
45 | public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
46 | inflater.inflate(R.menu.fragment_logging_ab, menu);
47 |
48 | final SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
49 | final boolean logging = preferences.getBoolean(PreferenceConstants.PREF_LOGGING, false);
50 |
51 | final View actionView = MenuItemCompat.getActionView(menu.findItem(R.id.logging_switch));
52 | final SwitchCompat logSwitch = (SwitchCompat) actionView.findViewById(R.id.logging_switch_view);
53 |
54 | logSwitch.setChecked(logging);
55 | logSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
56 | final SharedPreferences.Editor editor = getPreferenceManager()
57 | .getSharedPreferences().edit();
58 | editor.putBoolean(PreferenceConstants.PREF_LOGGING, isChecked).commit();
59 | updatePreferencesEnabled(logSwitch.isChecked());
60 | });
61 | }
62 |
63 | private void updatePreferencesEnabled(final boolean loggingEnabled) {
64 | for (final Preference preference : mPreferenceList) {
65 | preference.setEnabled(loggingEnabled);
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/android/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Crashlytics
2 | -keepattributes SourceFile,LineNumberTable,*Annotation*
3 | -keep public class * extends java.lang.Exception
4 |
5 | # Support
6 | -keep class android.support.*
7 |
8 | # Proguard
9 | -dontwarn java.lang.invoke.*
10 |
11 | # Bus
12 | -keep class co.fusionx.** { *; }
13 | -keep class com.fusionx.** { *; }
14 | -keepattributes *Annotation*
15 | -keepclassmembers class * {
16 | @com.fusionx.bus.Subscribe *;
17 | }
18 |
19 | # Okio
20 | -dontwarn java.nio.file.Files
21 | -dontwarn java.nio.file.Path
22 | -dontwarn java.nio.file.OpenOption
23 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
24 |
25 | # Spongycastle
26 | -keep class org.spongycastle.crypto.* {*;}
27 | -keep class org.spongycastle.crypto.agreement.** {*;}
28 | -keep class org.spongycastle.crypto.digests.* {*;}
29 | -keep class org.spongycastle.crypto.ec.* {*;}
30 | -keep class org.spongycastle.crypto.encodings.* {*;}
31 | -keep class org.spongycastle.crypto.engines.* {*;}
32 | -keep class org.spongycastle.crypto.macs.* {*;}
33 | -keep class org.spongycastle.crypto.modes.* {*;}
34 | -keep class org.spongycastle.crypto.paddings.* {*;}
35 | -keep class org.spongycastle.crypto.params.* {*;}
36 | -keep class org.spongycastle.crypto.prng.* {*;}
37 | -keep class org.spongycastle.crypto.signers.* {*;}
38 |
39 | -keep class org.spongycastle.jcajce.provider.asymmetric.* {*;}
40 | -keep class org.spongycastle.jcajce.provider.asymmetric.util.* {*;}
41 | -keep class org.spongycastle.jcajce.provider.asymmetric.dh.* {*;}
42 | -keep class org.spongycastle.jcajce.provider.asymmetric.ec.* {*;}
43 |
44 | -keep class org.spongycastle.jcajce.provider.digest.** {*;}
45 | -keep class org.spongycastle.jcajce.provider.keystore.** {*;}
46 | -keep class org.spongycastle.jcajce.provider.symmetric.** {*;}
47 | -keep class org.spongycastle.jcajce.spec.* {*;}
48 | -keep class org.spongycastle.jce.** {*;}
49 |
50 | -dontwarn javax.naming.**
51 |
52 | # Guava
53 | -keep class com.google.common.io.Resources {
54 | public static ;
55 | }
56 | -keep class com.google.common.collect.Lists {
57 | public static ** reverse(**);
58 | }
59 | -keep class com.google.common.base.Charsets {
60 | public static ;
61 | }
62 |
63 | -keep class com.google.common.base.Joiner {
64 | public static com.google.common.base.Joiner on(java.lang.String);
65 | public ** join(...);
66 | }
67 |
68 | -keep class com.google.common.collect.MapMakerInternalMap$ReferenceEntry
69 | -keep class com.google.common.cache.LocalCache$ReferenceEntry
70 |
71 | # http://stackoverflow.com/questions/9120338/proguard-configuration-for-guava-with-obfuscation-and-optimization
72 | -dontwarn javax.annotation.**
73 | -dontwarn javax.inject.**
74 | -dontwarn sun.misc.Unsafe
75 |
76 | # Guava 19.0
77 | -dontwarn java.lang.ClassValue
78 | -dontwarn com.google.j2objc.annotations.Weak
79 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/util/MiscUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | HoloIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of HoloIRC.
7 |
8 | HoloIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | HoloIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with HoloIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.util;
23 |
24 | import com.fusionx.bus.Bus;
25 | import com.fusionx.lightirc.R;
26 |
27 | import android.content.Context;
28 | import android.content.pm.PackageInfo;
29 | import android.content.pm.PackageManager;
30 |
31 | import co.fusionx.relay.base.ConnectionStatus;
32 |
33 | /**
34 | * Full of static utility methods
35 | *
36 | * @author Lalit Maganti
37 | */
38 | public class MiscUtils {
39 |
40 | private static final Bus sBus = new Bus();
41 |
42 | /**
43 | * Static utility methods only - can't instantiate this class
44 | */
45 | private MiscUtils() {
46 | }
47 |
48 | public static String getAppVersion(final Context context) {
49 | try {
50 | final PackageManager manager = context.getPackageManager();
51 | final String packageName = context.getPackageName();
52 | final PackageInfo info = manager.getPackageInfo(packageName, 0);
53 | return info.versionName + (packageName.endsWith(".debug") ? "-debug" : "");
54 | } catch (PackageManager.NameNotFoundException e) {
55 | e.printStackTrace();
56 | }
57 | return null;
58 | }
59 |
60 | public static String getStatusString(final Context context,
61 | final ConnectionStatus connectionStatus) {
62 | switch (connectionStatus) {
63 | case CONNECTED:
64 | return context.getString(R.string.status_connected);
65 | case RECONNECTING:
66 | return context.getString(R.string.status_reconnecting);
67 | case CONNECTING:
68 | return context.getString(R.string.status_connecting);
69 | case REGISTERING:
70 | return context.getString(R.string.status_registering);
71 | case DISCONNECTED:
72 | return context.getString(R.string.status_disconnected);
73 | default:
74 | return null;
75 | }
76 | }
77 |
78 | public static Bus getBus() {
79 | return sBus;
80 | }
81 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/preferences/NonEmptyEditTextPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | LightIRC - an IRC client for Android
3 |
4 | Copyright 2013 Lalit Maganti
5 |
6 | This file is part of LightIRC.
7 |
8 | LightIRC is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | LightIRC is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with LightIRC. If not, see .
20 | */
21 |
22 | package com.fusionx.lightirc.ui.preferences;
23 |
24 | import android.app.AlertDialog;
25 | import android.app.Dialog;
26 | import android.content.Context;
27 | import android.os.Bundle;
28 | import android.text.Editable;
29 | import android.text.TextWatcher;
30 | import android.util.AttributeSet;
31 | import android.widget.Button;
32 |
33 | /**
34 | * A EditTextPreference sub class which disables the positive button when the EditText is empty
35 | *
36 | * @author Lalit Maganti
37 | */
38 | public class NonEmptyEditTextPreference extends SummaryEditTextPreference implements TextWatcher {
39 |
40 | public NonEmptyEditTextPreference(final Context context, final AttributeSet attributes) {
41 | super(context, attributes);
42 | }
43 |
44 | @Override
45 | public void beforeTextChanged(final CharSequence s, final int start, final int before,
46 | final int count) {
47 | }
48 |
49 | @Override
50 | public void onTextChanged(final CharSequence s, final int start, final int before,
51 | final int count) {
52 | }
53 |
54 | @Override
55 | public void afterTextChanged(final Editable s) {
56 | onEditTextChanged();
57 | }
58 |
59 | @Override
60 | protected void showDialog(final Bundle state) {
61 | super.showDialog(state);
62 |
63 | final String text = getEditText().getText().toString();
64 | getEditText().getText().clear();
65 | getEditText().getText().append(text);
66 |
67 | getEditText().removeTextChangedListener(this);
68 | getEditText().addTextChangedListener(this);
69 | onEditTextChanged();
70 | }
71 |
72 | AlertDialog onEditTextChanged() {
73 | final boolean enable = !getEditText().getText().toString().isEmpty();
74 | final Dialog dlg = getDialog();
75 | final AlertDialog alertDlg = (AlertDialog) dlg;
76 | if (alertDlg != null) {
77 | final Button btn = alertDlg.getButton(AlertDialog.BUTTON_POSITIVE);
78 | btn.setEnabled(enable);
79 | getEditText().setError(enable ? null : "Must not be empty");
80 | }
81 | return alertDlg;
82 | }
83 | }
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/model/ServerConversationContainer.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.model;
2 |
3 | import com.google.common.collect.FluentIterable;
4 |
5 | import java.util.Collection;
6 | import java.util.Iterator;
7 | import java.util.LinkedHashSet;
8 | import java.util.Set;
9 |
10 | import co.fusionx.relay.base.ConnectionStatus;
11 | import co.fusionx.relay.base.Conversation;
12 | import co.fusionx.relay.base.Server;
13 |
14 | import static co.fusionx.relay.base.ServerConfiguration.Builder;
15 |
16 | public class ServerConversationContainer {
17 |
18 | private final Builder mBuilder;
19 |
20 | private final Set mConversations;
21 |
22 | private final Collection mIgnoreList;
23 |
24 | private Server mServer;
25 |
26 | public ServerConversationContainer(final Builder builder, final Collection ignoreList,
27 | final Server server) {
28 | mBuilder = builder;
29 | mIgnoreList = ignoreList;
30 | mConversations = new LinkedHashSet<>();
31 |
32 | setServer(server);
33 | }
34 |
35 | public boolean isServerAvailable() {
36 | return mServer != null && mServer.getStatus() != ConnectionStatus.STOPPED;
37 | }
38 |
39 | public String getTitle() {
40 | return mBuilder.getTitle();
41 | }
42 |
43 | public Server getServer() {
44 | return mServer;
45 | }
46 |
47 | public void setServer(final Server server) {
48 | mServer = server;
49 |
50 | if (server == null) {
51 | return;
52 | }
53 | FluentIterable.from(server.getUser().getChannels()).copyInto(mConversations);
54 | FluentIterable.from(server.getUserChannelInterface().getQueryUsers())
55 | .copyInto(mConversations);
56 | FluentIterable.from(server.getDCCManager().getChatConversations())
57 | .copyInto(mConversations);
58 | FluentIterable.from(server.getDCCManager().getFileConversations())
59 | .copyInto(mConversations);
60 | }
61 |
62 | public Collection getIgnoreList() {
63 | return mIgnoreList;
64 | }
65 |
66 | public Builder getBuilder() {
67 | return mBuilder;
68 | }
69 |
70 | public void addConversation(final Conversation conversation) {
71 | mConversations.add(conversation);
72 | }
73 |
74 | public void removeConversation(final Conversation conversation) {
75 | mConversations.remove(conversation);
76 | }
77 |
78 | public int getConversationCount() {
79 | return mConversations.size();
80 | }
81 |
82 | public Conversation getConversation(int childPos) {
83 | final Iterator iterator = mConversations.iterator();
84 | for (int i = 0; i < childPos; i++) {
85 | iterator.next();
86 | }
87 | return iterator.next();
88 | }
89 |
90 | public void refreshConversations() {
91 | removeAll();
92 | setServer(mServer);
93 | }
94 |
95 | public void removeAll() {
96 | mConversations.clear();
97 | }
98 | }
--------------------------------------------------------------------------------
/README.mkdn:
--------------------------------------------------------------------------------
1 | What is HoloIRC?
2 | =====
3 | HoloIRC is an open source IRC client for Android. It is intended to be very lightweight and easy to use while not sacrificing on features. It has been released on the Google Play Store.
4 |
5 | Building HoloIRC
6 | =====
7 | HoloIRC is relatively easy to build after the initial setup. The following should be done:
8 | - This repo should be cloned - pick which branch you want
9 | - A directory called libraries should be created inside the cloned folder
10 | - https://github.com/tilal6991/Relay should be cloned into a folder called relay - pick the branch matching HoloIRC's branch
11 | - https://github.com/tilal6991/Bus should be cloned into a folder called bus - clone the develop branch
12 | - Then run ./gradlew assembleDebug in the root directory
13 | - This should create a debug apk in HoloIRC/build/apk which you can install
14 |
15 | Forking
16 | =====
17 | Please feel free to fork the repo to add anything you want or fix any bugs you've spotted. I'd also very much appreciate if you could send a pull request to fix it my sources as well.
18 |
19 | License
20 | =====
21 | HoloIRC - Copyright (c) Lalit Maganti 2013-2014
22 |
23 | HoloIRC is free software: you can redistribute it and/or modify
24 | it under the terms of the GNU General Public License as published by
25 | the Free Software Foundation, either version 3 of the License, or
26 | (at your option) any later version.
27 | HoloIRC is distributed in the hope that it will be useful,
28 | but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 | GNU General Public License for more details.
31 | You should have received a copy of the GNU General Public License
32 | along with HoloIRC. If not, see .
33 |
34 |
35 | TODO
36 | ====
37 | - [ ] Add more options in general - this has come up a lot - people want customization. More specifically
38 | - [ ] ability to customize fonts
39 | - [ ] ability to customize colours
40 | - [ ] Fix text for query notifications - currently still refers to mentioning
41 | - [ ] Make invites which come in as the Invite menu is showing appear straight away
42 |
43 | Credits
44 | =====
45 | This project depends on several libraries each of which have their own license and deserve sincere thanks:
46 | * Guava by Google - licensed under the Apache License v2
47 | * Android Support Library (v4 and v7) by Google - licensed under the Apache License v2
48 | * ListViewAnimations by Niek Haarman - the project can be found at https://github.com/nhaarman/ListViewAnimations and is licensed under the Apache License v2
49 | * StickyListHeaders by Emil Sjölander - the project can be found at https://github.com/emilsjolander/StickyListHeaders and is licensed under the Apache License v2
50 | * Otto by Square - licensed under the Apache License v2
51 | * Commons Lang by Apache - licensed under the Apache License v2
52 | * NineOldAndroids by Jake Wharton - licensed under the Apache License v2
53 | * Crouton by Benjamin Weiss - licensed under the Apache License v2
54 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fusionx/lightirc/ui/IgnoredUsersAdapter.java:
--------------------------------------------------------------------------------
1 | package com.fusionx.lightirc.ui;
2 |
3 | import com.fusionx.lightirc.R;
4 |
5 | import android.content.Context;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | import java.util.ArrayList;
14 | import java.util.Collection;
15 | import java.util.List;
16 |
17 | public class IgnoredUsersAdapter
18 | extends RecyclerView.Adapter {
19 |
20 | private final LayoutInflater mLayoutInflater;
21 |
22 | private final List mIgnoredUsers;
23 |
24 | private final View.OnClickListener mDeclineListener;
25 |
26 | public IgnoredUsersAdapter(final Context context, final View.OnClickListener declineListener) {
27 | mLayoutInflater = LayoutInflater.from(context);
28 | mDeclineListener = declineListener;
29 |
30 | mIgnoredUsers = new ArrayList<>();
31 | }
32 |
33 | @Override
34 | public IgnoreViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType) {
35 | final View view = mLayoutInflater.inflate(R.layout.ignore_list_item, parent, false);
36 | return new IgnoreViewHolder(view);
37 | }
38 |
39 | @Override
40 | public void onBindViewHolder(final IgnoreViewHolder holder, final int position) {
41 | final String user = mIgnoredUsers.get(position);
42 | holder.titleView.setText(user);
43 |
44 | holder.declineView.setOnClickListener(mDeclineListener);
45 | holder.declineView.setTag(user);
46 | }
47 |
48 | @Override
49 | public int getItemCount() {
50 | return mIgnoredUsers.size();
51 | }
52 |
53 | public void addAll(final Collection arrayList) {
54 | final int size = mIgnoredUsers.size();
55 | mIgnoredUsers.addAll(arrayList);
56 | notifyItemRangeInserted(size, arrayList.size());
57 | }
58 |
59 | public void add(final String input) {
60 | if (mIgnoredUsers.indexOf(input) == -1) {
61 | final int size = mIgnoredUsers.size();
62 | mIgnoredUsers.add(input);
63 | notifyItemInserted(size);
64 | }
65 | }
66 |
67 | public void remove(final String string) {
68 | final int index = mIgnoredUsers.indexOf(string);
69 | mIgnoredUsers.remove(index);
70 | notifyItemRemoved(index);
71 | }
72 |
73 | public List getItems() {
74 | return new ArrayList<>(mIgnoredUsers);
75 | }
76 |
77 | public static class IgnoreViewHolder extends RecyclerView.ViewHolder {
78 |
79 | public final TextView titleView;
80 |
81 | private final ImageView declineView;
82 |
83 | public IgnoreViewHolder(final View itemView) {
84 | super(itemView);
85 |
86 | declineView = (ImageView) itemView.findViewById(R.id.decline_list_item);
87 |
88 | titleView = (TextView) itemView.findViewById(R.id.ignore_list_item_title);
89 | }
90 | }
91 | }
--------------------------------------------------------------------------------