<commit_before>import loggerCreator from "app/utils/logger";
var moduleLogger = loggerCreator("player_page");

import React, { Component } from "react";
import { StyleSheet, View, Image } from "react-native";
import { observer } from "mobx-react";

import { colors } from "app/styles/styles";
import PlayerContextMenu from "./player_context_menu";
import { player } from "app/stores/player/player";
import Rating from "../../shared_components/rating";
import AlbumArt from "./album_art";
import PlayerControls from "./player_controls";
import LoadingSpinner from "../../shared_components/loading_spinner";
import SongDetails from "app/pages/player_page/song_details";
import NoPlaylistSelected from "app/pages/player_page/no_playlist_selected";

const styles = StyleSheet.create({
  container: {
    flex: 1,
    // remove width and height to override fixed static size
    width: null,
    height: null,
    alignItems: "center",
    alignSelf: "stretch",
  },
  // Playlist name
  playlistNameView: {
    flexDirection: "row",
    alignItems: "center",
    alignSelf: "stretch",
    marginBottom: 10,
    paddingTop: 5,
    paddingLeft: 5,
  },
  playlistIcon: {
    color: colors.SEMI_WHITE,
    marginRight: 5,
  },
  // Sections
  albumArt: {
    marginBottom: 20,
    flex: 1,
  },
  rating: {
    marginBottom: 20,
    paddingHorizontal: 10,
    alignSelf: "center",
  },
  songDetails: {
    marginBottom: 15,
  },
});

@observer
export default class PlayerPage extends Component {
  componentWillMount() {
    let logger = loggerCreator("componentWillMount", moduleLogger);
  }

  componentDidMount() {
    loggerCreator("componentDidMount", moduleLogger);
  }

  componentWillUnmount() {
    loggerCreator("componentWillUnmount", moduleLogger);
  }

  render() {
    let logger = loggerCreator("render", moduleLogger);

    const song = player.currentSong;
    logger.info(`rendering song: ${song && song.toString()}`);

    return (
      <View style={styles.container}>
        {(() => {
          if (!player.currentPlaylist) {
            return <NoPlaylistSelected />;<commit_msg>mock - ability to navigate to player directly<commit_after>import loggerCreator from "app/utils/logger";
var moduleLogger = loggerCreator("player_page");

import React, { Component } from "react";
import { StyleSheet, View, Image } from "react-native";
import { observer } from "mobx-react";
import { masterStore } from "app/stores/master_store";

import { colors } from "app/styles/styles";
import PlayerContextMenu from "./player_context_menu";
import { player } from "app/stores/player/player";
import Rating from "../../shared_components/rating";
import AlbumArt from "./album_art";
import PlayerControls from "./player_controls";
import LoadingSpinner from "../../shared_components/loading_spinner";
import SongDetails from "app/pages/player_page/song_details";
import NoPlaylistSelected from "app/pages/player_page/no_playlist_selected";

const styles = StyleSheet.create({
  container: {
    flex: 1,
    // remove width and height to override fixed static size
    width: null,
    height: null,
    alignItems: "center",
    alignSelf: "stretch",
  },
  // Playlist name
  playlistNameView: {
    flexDirection: "row",
    alignItems: "center",
    alignSelf: "stretch",
    marginBottom: 10,
    paddingTop: 5,
    paddingLeft: 5,
  },
  playlistIcon: {
    color: colors.SEMI_WHITE,
    marginRight: 5,
  },
  // Sections
  albumArt: {
    marginBottom: 20,
    flex: 1,
  },
  rating: {
    marginBottom: 20,
    paddingHorizontal: 10,
    alignSelf: "center",
  },
  songDetails: {
    marginBottom: 15,
  },
});

@observer
export default class PlayerPage extends Component {
  async componentWillMount() {
    let logger = loggerCreator("componentWillMount", moduleLogger);
    // Mock: Starts playing automatically
    // await player.changePlaylist("mock");
    // masterStore.closeSidebars();
    // player.play();
    // navigator.navigateToPlayer();
  }

  componentDidMount() {
    loggerCreator("componentDidMount", moduleLogger);
  }

  componentWillUnmount() {
    loggerCreator("componentWillUnmount", moduleLogger);
  }

  render() {
    let logger = loggerCreator("render", moduleLogger);

    const song = player.currentSong;
    logger.info(`rendering song: ${song && song.toString()}`);

    return (
      <View style={styles.container}>
        {(() => {
          if (!player.currentPlaylist) {
            return <NoPlaylistSelected />;
{'fraction_non_alphanumeric': 0.12836021505376344, 'fraction_numerical': 0.006720430107526882, 'mean_word_length': 3.6901260504201683, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2390726', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1301, 'n_words': 328}